summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/logging/central-logging-server.nix
blob: 90f8e66809444de8da1b0e32676424f281bde45d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{pkgs, config, ...}:

with import <stockholm/lib>;
let
  es-port = 9200;
  kibana-port = 5601;
in {
  services.elasticsearch = {
    enable = true;
    listenAddress = "0.0.0.0";
    port = es-port;
  };
  services.kibana = {
    enable = true;
    listenAddress = "0.0.0.0";
    port = kibana-port;
  };

  networking.firewall.extraCommands = ''
    iptables -A INPUT -i retiolum -p tcp --dport ${toString es-port} -j ACCEPT
    iptables -A INPUT -i retiolum -p tcp --dport ${toString kibana-port} -j ACCEPT
  '';
}