nixos/munin: enable munin_update and disable munin_stats
munin_update relies on a stats file that exists, but isn't found in the default location on NixOS; the appropriate plugin configuration is added. munin_stats relies on munin-cron writing a logfile, which the NixOS build of munin does not. (This is probably fixable in the munin package, but I don't have time to dig into that right now.)
This commit is contained in:
parent
e7c1449ae9
commit
ace4855cf6
@ -66,6 +66,9 @@ let
|
|||||||
user root
|
user root
|
||||||
group root
|
group root
|
||||||
|
|
||||||
|
[munin*]
|
||||||
|
env.UPDATE_STATSFILE /var/lib/munin/munin-update.stats
|
||||||
|
|
||||||
${nodeCfg.extraPluginConfig}
|
${nodeCfg.extraPluginConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -226,13 +229,20 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
disabledPlugins = mkOption {
|
disabledPlugins = mkOption {
|
||||||
default = [];
|
# TODO: figure out why Munin isn't writing the log file and fix it.
|
||||||
|
# In the meantime this at least suppresses a useless graph full of
|
||||||
|
# NaNs in the output.
|
||||||
|
default = [ "munin_stats" ];
|
||||||
type = with types; listOf string;
|
type = with types; listOf string;
|
||||||
description = ''
|
description = ''
|
||||||
Munin plugins to disable, even if
|
Munin plugins to disable, even if
|
||||||
<literal>munin-node-configure --suggest</literal> tries to enable
|
<literal>munin-node-configure --suggest</literal> tries to enable
|
||||||
them. To disable a wildcard plugin, use an actual wildcard, as in
|
them. To disable a wildcard plugin, use an actual wildcard, as in
|
||||||
the example.
|
the example.
|
||||||
|
|
||||||
|
munin_stats is disabled by default as it tries to read
|
||||||
|
<literal>/var/log/munin/munin-update.log</literal> for timing
|
||||||
|
information, and the NixOS build of Munin does not write this file.
|
||||||
'';
|
'';
|
||||||
example = [ "diskstats" "zfs_usage_*" ];
|
example = [ "diskstats" "zfs_usage_*" ];
|
||||||
};
|
};
|
||||||
@ -312,6 +322,7 @@ in
|
|||||||
description = "Munin monitoring user";
|
description = "Munin monitoring user";
|
||||||
group = "munin";
|
group = "munin";
|
||||||
uid = config.ids.uids.munin;
|
uid = config.ids.uids.munin;
|
||||||
|
home = "/var/lib/munin";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
users.groups = [{
|
users.groups = [{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user