diff options
Diffstat (limited to 'nixos/modules/services/monitoring/munin.nix')
-rw-r--r-- | nixos/modules/services/monitoring/munin.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix index 21840bc67e8..31afa859e25 100644 --- a/nixos/modules/services/monitoring/munin.nix +++ b/nixos/modules/services/monitoring/munin.nix @@ -34,10 +34,10 @@ let cap=$(sed -nr 's/.*#%#\s+capabilities\s*=\s*(.+)/\1/p' $file) wrapProgram $file \ - --set PATH "/run/current-system/sw/bin:/run/current-system/sw/sbin" \ + --set PATH "/var/setuid-wrappers:/run/current-system/sw/bin:/run/current-system/sw/bin" \ --set MUNIN_LIBDIR "${pkgs.munin}/lib" \ --set MUNIN_PLUGSTATE "/var/run/munin" - + # munin uses markers to tell munin-node-configure what a plugin can do echo "#%# family=$family" >> $file echo "#%# capabilities=$cap" >> $file @@ -57,7 +57,7 @@ let rundir /var/run/munin ${cronCfg.extraGlobalConfig} - + ${cronCfg.hosts} ''; @@ -72,10 +72,10 @@ let group root host_name ${config.networking.hostName} setsid 0 - + # wrapped plugins by makeWrapper being with dots ignore_file ^\. - + allow ^127\.0\.0\.1$ ${nodeCfg.extraConfig} @@ -97,7 +97,7 @@ in See <link xlink:href='http://munin-monitoring.org/wiki/munin-node.conf' />. ''; }; - + extraConfig = mkOption { default = ""; description = '' @@ -118,7 +118,7 @@ in Enable munin-cron. Takes care of all heavy lifting to collect data from nodes and draws graphs to html. Runs munin-update, munin-limits, munin-graphs and munin-html in that order. - + HTML output is in <filename>/var/www/munin/</filename>, configure your favourite webserver to serve static files. ''; @@ -138,7 +138,7 @@ in }; ''; }; - + extraGlobalConfig = mkOption { default = ""; description = '' @@ -160,7 +160,7 @@ in <link xlink:href='http://munin-monitoring.org/wiki/munin.conf' /> ''; }; - + }; }; @@ -194,7 +194,7 @@ in mkdir -p /etc/munin/plugins rm -rf /etc/munin/plugins/* - PATH="/run/current-system/sw/bin:/run/current-system/sw/sbin" ${pkgs.munin}/sbin/munin-node-configure --shell --families contrib,auto,manual --config ${nodeConf} --libdir=${muninPlugins} --servicedir=/etc/munin/plugins 2>/dev/null | ${pkgs.bash}/bin/bash + PATH="/var/setuid-wrappers:/run/current-system/sw/bin:/run/current-system/sw/bin" ${pkgs.munin}/sbin/munin-node-configure --shell --families contrib,auto,manual --config ${nodeConf} --libdir=${muninPlugins} --servicedir=/etc/munin/plugins 2>/dev/null | ${pkgs.bash}/bin/bash ''; serviceConfig = { ExecStart = "${pkgs.munin}/sbin/munin-node --config ${nodeConf} --servicedir /etc/munin/plugins/"; |