git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/munin: enable munin_update and disable munin_stats
ace4855Ben Kelly
nixos/modules/services/monitoring/munin.nix+12−1
@@ -66,6 +66,9 @@ let
66 user root
66 user root
67 group root
67 group root
68
68
69+ [munin*]
70+ env.UPDATE_STATSFILE /var/lib/munin/munin-update.stats
71+
69 ${nodeCfg.extraPluginConfig}
72 ${nodeCfg.extraPluginConfig}
70 '';
73 '';
71
74
@@ -226,13 +229,20 @@ in
226 };
229 };
227
230
228 disabledPlugins = mkOption {
231 disabledPlugins = mkOption {
232+ # TODO: figure out why Munin isn't writing the log file and fix it.
233+ # In the meantime this at least suppresses a useless graph full of
234+ # NaNs in the output.
229− default = [];
235+ default = [ "munin_stats" ];
230 type = with types; listOf string;
236 type = with types; listOf string;
231 description = ''
237 description = ''
232 Munin plugins to disable, even if
238 Munin plugins to disable, even if
233 <literal>munin-node-configure --suggest</literal> tries to enable
239 <literal>munin-node-configure --suggest</literal> tries to enable
234 them. To disable a wildcard plugin, use an actual wildcard, as in
240 them. To disable a wildcard plugin, use an actual wildcard, as in
235 the example.
241 the example.
242+
243+ munin_stats is disabled by default as it tries to read
244+ <literal>/var/log/munin/munin-update.log</literal> for timing
245+ information, and the NixOS build of Munin does not write this file.
236 '';
246 '';
237 example = [ "diskstats" "zfs_usage_*" ];
247 example = [ "diskstats" "zfs_usage_*" ];
238 };
248 };
@@ -312,6 +322,7 @@ in
312 description = "Munin monitoring user";
322 description = "Munin monitoring user";
313 group = "munin";
323 group = "munin";
314 uid = config.ids.uids.munin;
324 uid = config.ids.uids.munin;
325+ home = "/var/lib/munin";
315 }];
326 }];
316
327
317 users.groups = [{
328 users.groups = [{