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>
This commit is contained in:
committed by
Symphorien Gibol
co-authored by
Aaron Andersen
parent
fa28c7750a
commit
be25e45fc8
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user