stockholm/krebs/2configs/shack/influx.nix

34 lines
925 B
Nix
Raw Normal View History

2019-09-02 11:56:34 +00:00
{pkgs, ... }: # hostname: influx.shack
let
port = 8086;
2019-09-02 11:56:34 +00:00
collectd-port = 25826;
db = "collectd_db";
in
{
networking.firewall.allowedTCPPorts = [ port ]; # for legacy applications
2019-09-02 11:56:34 +00:00
networking.firewall.allowedUDPPorts = [ collectd-port ];
services.nginx.virtualHosts."influx.shack" = {
locations."/" = {
proxyPass = "http://localhost:${toString port}/";
};
};
services.influxdb = {
enable = true;
extraConfig = {
2019-07-19 22:09:47 +00:00
http.bind-address = "0.0.0.0:${toString port}";
http.log-enabled = false;
2019-09-02 11:56:34 +00:00
http.write-tracing = false;
http.suppress-write-log = true;
data.trace-logging-enabled = false;
data.query-log-enabled = false;
monitoring.enabled = false;
collectd = [{
enabled = true;
typesdb = "${pkgs.collectd}/share/collectd/types.db";
database = db;
bind-address = ":${toString collectd-port}";
}];
};
};
}