summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/influx.nix
diff options
context:
space:
mode:
authorlassulus <lass@xerxes.r>2019-09-06 15:37:58 +0200
committerlassulus <lass@xerxes.r>2019-09-06 15:37:58 +0200
commited97000b20623a952e41e808756ea8c8dfb666e6 (patch)
treef039f642bc03388704a66d94fc8ace402b583945 /krebs/2configs/shack/influx.nix
parentc2773285ebf8165fd725065047df7a58da01fb42 (diff)
parentfce2c4275caf7df064fb13a4280291a9aefaef1f (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/2configs/shack/influx.nix')
-rw-r--r--krebs/2configs/shack/influx.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/krebs/2configs/shack/influx.nix b/krebs/2configs/shack/influx.nix
new file mode 100644
index 000000000..92cb24bf3
--- /dev/null
+++ b/krebs/2configs/shack/influx.nix
@@ -0,0 +1,33 @@
+{pkgs, ... }: # hostname: influx.shack
+let
+ port = 8086;
+ collectd-port = 25826;
+ db = "collectd_db";
+in
+{
+ networking.firewall.allowedTCPPorts = [ port ]; # for legacy applications
+ networking.firewall.allowedUDPPorts = [ collectd-port ];
+ services.nginx.virtualHosts."influx.shack" = {
+ locations."/" = {
+ proxyPass = "http://localhost:${toString port}/";
+ };
+ };
+ services.influxdb = {
+ enable = true;
+ extraConfig = {
+ http.bind-address = "0.0.0.0:${toString port}";
+ http.log-enabled = false;
+ 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}";
+ }];
+ };
+ };
+}