aboutsummaryrefslogtreecommitdiff
path: root/modules/private/system/monitoring-1.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-10-24 11:42:28 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-10-24 11:42:28 +0200
commite43fdf341072e4a0150324196fc7af8f383860ec (patch)
treee90a9b225c3b8f770911f3ec4b41328ff1f66d8b /modules/private/system/monitoring-1.nix
parent70712d466fd52ebd48c5ddda2556ac36f04677a0 (diff)
downloadNix-e43fdf341072e4a0150324196fc7af8f383860ec.tar.gz
Nix-e43fdf341072e4a0150324196fc7af8f383860ec.tar.zst
Nix-e43fdf341072e4a0150324196fc7af8f383860ec.zip
Add netdata configuration
Diffstat (limited to 'modules/private/system/monitoring-1.nix')
-rw-r--r--modules/private/system/monitoring-1.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/private/system/monitoring-1.nix b/modules/private/system/monitoring-1.nix
index 2241b2b..188162a 100644
--- a/modules/private/system/monitoring-1.nix
+++ b/modules/private/system/monitoring-1.nix
@@ -35,6 +35,20 @@
35 }) 35 })
36 ]; 36 ];
37 37
38 services.netdata.enable = true;
39 services.netdata.config.web."allow dashboard from" = "localhost";
40 services.netdata.config.web."allow badges from" = "*";
41 services.netdata.config.web."allow streaming from" = "*";
42 services.netdata.config.web."allow netdata.conf from" = "fd*";
43 services.netdata.config.web."allow management from" = "fd*";
44 networking.firewall.allowedTCPPorts = [ 19999 ];
45 environment.etc."netdata/stream.conf".text = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (_: key: ''
46 [${key}]
47 enabled = yes
48 default history = 3600
49 default memory = ram
50 health enabled by default = auto
51 '') config.myEnv.monitoring.netdata_keys);
38 # This value determines the NixOS release with which your system is 52 # This value determines the NixOS release with which your system is
39 # to be compatible, in order to avoid breaking some software such as 53 # to be compatible, in order to avoid breaking some software such as
40 # database servers. You should change this only after NixOS release 54 # database servers. You should change this only after NixOS release