diff options
author | Ben Kelly <bk@ancilla.ca> | 2018-12-14 19:26:02 -0500 |
---|---|---|
committer | Ben Kelly <btk@google.com> | 2019-02-04 20:17:26 -0500 |
commit | ace4855cf6998d43c2d347aec03a65d0089201ed (patch) | |
tree | ac8a3657aa84b87ed781d60bc4a356e75231d97d /nixos/modules/services/monitoring/munin.nix | |
parent | e7c1449ae92646723296bf3da12dcc53af8aa272 (diff) | |
download | nixpkgs-ace4855cf6998d43c2d347aec03a65d0089201ed.tar nixpkgs-ace4855cf6998d43c2d347aec03a65d0089201ed.tar.gz nixpkgs-ace4855cf6998d43c2d347aec03a65d0089201ed.tar.bz2 nixpkgs-ace4855cf6998d43c2d347aec03a65d0089201ed.tar.lz nixpkgs-ace4855cf6998d43c2d347aec03a65d0089201ed.tar.xz nixpkgs-ace4855cf6998d43c2d347aec03a65d0089201ed.tar.zst nixpkgs-ace4855cf6998d43c2d347aec03a65d0089201ed.zip |
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.)
Diffstat (limited to 'nixos/modules/services/monitoring/munin.nix')
-rw-r--r-- | nixos/modules/services/monitoring/munin.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix index bf1be56ee9e..f6798632724 100644 --- a/nixos/modules/services/monitoring/munin.nix +++ b/nixos/modules/services/monitoring/munin.nix @@ -66,6 +66,9 @@ let user root group root + [munin*] + env.UPDATE_STATSFILE /var/lib/munin/munin-update.stats + ${nodeCfg.extraPluginConfig} ''; @@ -226,13 +229,20 @@ in }; 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; description = '' Munin plugins to disable, even if <literal>munin-node-configure --suggest</literal> tries to enable them. To disable a wildcard plugin, use an actual wildcard, as in 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_*" ]; }; @@ -312,6 +322,7 @@ in description = "Munin monitoring user"; group = "munin"; uid = config.ids.uids.munin; + home = "/var/lib/munin"; }]; users.groups = [{ |