New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nagios: various improvements #76551
nagios: various improvements #76551
Conversation
@symphorien do you (or anyone) actually use |
since a few days I have been setting one nagios instance on nixos, yes. |
Nice! I was evaluating it for a while but ended up going with The |
I added myself as maintainer of the module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for listing yourself as a maintainer! I was recently thinking we should remove the module because it is so unmaintained!
This change looks good. Just one minor nitpick.
Do you have any motivation either in this PR or a future PR to write a NixOS test? This has always been a sticky point for me when making changes to the nagios
module or packages in NixOS, and I always thought a NixOS module would be really cool for nagios
as it could demonstrate a fair bit.
Gosh now that I think about it... a zabbix
test might be pretty cool too, right @mmahut 😉 (just razzing 😄)
A test that checks that alerts work might be easy to do, but not testing the web interface. I might try if I find the time and motivation, we'll see. |
@symphorien this looks good. Can you possibly fixup the whitespace in the code generating |
@aanderse I fixed the spacing and added a simplistic nixos test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@symphorien you're a rock star! 🚀 Please squash into either 1 or 2 commits (if 2 then a single commit for the module and a single commit for the test, your call) and we'll merge this.
Thank you!
* 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>
done |
@GrahamcOfBorg test nagios |
@GrahamcOfBorg eval |
debug mode without having to write the whole config file by hand
/etc but that if you change the link in /etc/ and restart nagios, it
has no effect. Have nagios use /etc/nagios.cfg
Things done
I tested by running nagios for a few days on 19.09.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @thoughtpolice @relrod