diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-10-24 11:42:28 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-10-24 11:42:28 +0200 |
commit | e43fdf341072e4a0150324196fc7af8f383860ec (patch) | |
tree | e90a9b225c3b8f770911f3ec4b41328ff1f66d8b /modules/private/system | |
parent | 70712d466fd52ebd48c5ddda2556ac36f04677a0 (diff) | |
download | Nix-e43fdf341072e4a0150324196fc7af8f383860ec.tar.gz Nix-e43fdf341072e4a0150324196fc7af8f383860ec.tar.zst Nix-e43fdf341072e4a0150324196fc7af8f383860ec.zip |
Add netdata configuration
Diffstat (limited to 'modules/private/system')
-rw-r--r-- | modules/private/system/eldiron.nix | 10 | ||||
-rw-r--r-- | modules/private/system/monitoring-1.nix | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/modules/private/system/eldiron.nix b/modules/private/system/eldiron.nix index 15ddd40..f11afb6 100644 --- a/modules/private/system/eldiron.nix +++ b/modules/private/system/eldiron.nix | |||
@@ -96,6 +96,16 @@ | |||
96 | services.duplyBackup.enable = false; | 96 | services.duplyBackup.enable = false; |
97 | services.duplyBackup.profiles.oldies.rootDir = "/var/lib/oldies"; | 97 | services.duplyBackup.profiles.oldies.rootDir = "/var/lib/oldies"; |
98 | 98 | ||
99 | services.netdata.enable = true; | ||
100 | services.netdata.config.global."memory mode" = "none"; | ||
101 | services.netdata.config.health."enabled" = "no"; | ||
102 | services.netdata.config.web.mode = "none"; | ||
103 | environment.etc."netdata/stream.conf".text = '' | ||
104 | [stream] | ||
105 | enabled = yes | ||
106 | destination = ${config.myEnv.monitoring.netdata_aggregator} | ||
107 | api key = ${config.myEnv.monitoring.netdata_keys.eldiron} | ||
108 | ''; | ||
99 | secrets.keys = [ | 109 | secrets.keys = [ |
100 | { | 110 | { |
101 | dest = "zrepl_backup/identity"; | 111 | dest = "zrepl_backup/identity"; |
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 |