diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/private/system/monitoring-1.nix | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/modules/private/system/monitoring-1.nix b/modules/private/system/monitoring-1.nix index 188162a..2198d09 100644 --- a/modules/private/system/monitoring-1.nix +++ b/modules/private/system/monitoring-1.nix | |||
@@ -42,13 +42,24 @@ | |||
42 | services.netdata.config.web."allow netdata.conf from" = "fd*"; | 42 | services.netdata.config.web."allow netdata.conf from" = "fd*"; |
43 | services.netdata.config.web."allow management from" = "fd*"; | 43 | services.netdata.config.web."allow management from" = "fd*"; |
44 | networking.firewall.allowedTCPPorts = [ 19999 ]; | 44 | networking.firewall.allowedTCPPorts = [ 19999 ]; |
45 | environment.etc."netdata/stream.conf".text = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (_: key: '' | 45 | environment.etc."netdata/stream.conf".source = "/var/secrets/netdata-stream.conf"; |
46 | [${key}] | 46 | |
47 | enabled = yes | 47 | secrets.keys = [ |
48 | default history = 3600 | 48 | { |
49 | default memory = ram | 49 | dest = "netdata-stream.conf"; |
50 | health enabled by default = auto | 50 | user = config.services.netdata.user; |
51 | '') config.myEnv.monitoring.netdata_keys); | 51 | group = config.services.netdata.group; |
52 | permissions = "0400"; | ||
53 | text = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (_: key: '' | ||
54 | [${key}] | ||
55 | enabled = yes | ||
56 | default history = 3600 | ||
57 | default memory = ram | ||
58 | health enabled by default = auto | ||
59 | '') config.myEnv.monitoring.netdata_keys); | ||
60 | } | ||
61 | ]; | ||
62 | users.users."${config.services.netdata.user}".extraGroups = [ "keys" ]; | ||
52 | # This value determines the NixOS release with which your system is | 63 | # This value determines the NixOS release with which your system is |
53 | # to be compatible, in order to avoid breaking some software such as | 64 | # to be compatible, in order to avoid breaking some software such as |
54 | # database servers. You should change this only after NixOS release | 65 | # database servers. You should change this only after NixOS release |