tech and other rants

autodeploy generated nconf nagios config

April 6th, 2009 in Uncategorized

Recently I started playing with this backend interface for Nagios called NConf. This is a very young project but from what I see it’s a very promising project:
http://sourceforge.net/projects/nconf/

Since it’s a new project it lacks some features such as, after generating nagios config files, it does not put them into production. So i created a little script that run in cron and check if new configs were created, if yes it put them into the right place and restarts nagios if there are no errors:

Put this code into a new file. Be sure to modify the paths at the beginning with what corresponds with your setup.
do a chmod +x filename on the file

then run crontab -e
and add a silimar line:
*/5 * * * * /path/to/filename

Now every 5 minutes the script will look for new generated configs and put the into nagios. Then checks if there are errors and if there aren’t it restarts nagios.

Nagios is an opensource monitoring system that support custom checks. More info at nagios.org

Tags: , , ,

2 Responses to “autodeploy generated nconf nagios config”

  • Mobi
    May 4th, 2009 at 12:43 pm

    mboeru,

    are you using ldap for nconf authentication? the product looks nice but i can’t seem to make it work with ldap.

    mobi

  • Zen
    May 18th, 2009 at 2:09 am

    no I don’t use ldap. I’m still testing it out. haven’t put it in production as I have 250 host and 800 services to monitor.

Leave a Reply