diff options
author | symphorien+git@xlumurb.eu <Symphorien Gibol> | 2019-12-26 12:00:00 +0000 |
---|---|---|
committer | Symphorien Gibol <symphorien+git@xlumurb.eu> | 2019-12-30 16:40:52 +0100 |
commit | be25e45fc86612fc52cc3361800547b3552b0131 (patch) | |
tree | 142f6251ac8d2d4e6311891d6445dc0bbabd0b49 /pkgs/servers/monitoring/nagios | |
parent | fa28c7750a393dc5139c6a4c75beeadf2a6f0108 (diff) |
nagios: various improvements
* structured config for main config file allows to launch nagios in debug mode without having to write the whole config file by hand * build time syntax check * all options have types, one more example * I find it misleading that the main nagios config file is linked in /etc but that if you change the link in /etc/ and restart nagios, it has no effect. Have nagios use /etc/nagios.cfg * fix paths in example nagios config files, which allows to reuse it: services.nagios.objectDefs = (map (x: "${pkgs.nagios}/etc/objects/${x}.cfg") [ "templates" "timeperiods" "commands" ]) ++ [ ./main.cfg ] * for the above reason, add mailutils to default plugins Co-Authored-By: Aaron Andersen <aaron@fosslib.net>
Diffstat (limited to 'pkgs/servers/monitoring/nagios')
-rw-r--r-- | pkgs/servers/monitoring/nagios/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/nagios/default.nix b/pkgs/servers/monitoring/nagios/default.nix index 693e67ee6ddb4..d1654bdf3f7c0 100644 --- a/pkgs/servers/monitoring/nagios/default.nix +++ b/pkgs/servers/monitoring/nagios/default.nix @@ -20,6 +20,13 @@ stdenv.mkDerivation rec { substituteInPlace Makefile --replace '$(MAKE) install-basic' "" ''; installTargets = "install install-config"; + postInstall = '' + # don't make default files use hardcoded paths to commands + sed -i 's@command_line *[^ ]*/\([^/]*\) @command_line \1 @' $out/etc/objects/commands.cfg + sed -i 's@/usr/bin/@@g' $out/etc/objects/commands.cfg + sed -i 's@/bin/@@g' $out/etc/objects/commands.cfg + ''; + meta = { description = "A host, service and network monitoring program"; |