Dynamically generated service checks

Max perldork at webwizarddesign.com
Wed Jul 15 18:02:41 CEST 2009


On Wed, Jul 15, 2009 at 11:19 AM, David Rosenstrauch<darose at darose.net> wrote:
> 2) If I understand correctly, Nagios loads its config files at startup
> time and does not re-read them after that.  So if I'm regenerating a
> config file, then that means I'd need to restart the Nagios service
> afterwards, which is a bit of an onerous imposition.  And although
> again, I could in theory do this in a cron job, I'm not sure I'm
> comfortable with that.

As long as you are not using ePN, you can just send a HUP signal to
the parent Nagios process; this will cause it to re-read the
configuration file(s) from disk.

> There's the potential for the Nagios service to
> not start up again successfully, and I don't like taking the risk that
> this dynamic update procedure could potentially bring down the entire
> Nagios system.

We let our users make changes via SVN using a branch per project, tag
their code, then we merge their sub-trees into our master configs, tag
our configs, and push them out to our production system; we have a
test instance that  validates the configs with checkconfig before we
push to production.  would be easy enough to have your automated push
out do something similar and send Nagios a trap or an NSCA passive
service to alert you to a bad config and not push to production

Because we do a lot of trending, we restart Nagios every night to
minimize scheduling skew; 20 minutes or so before the auto-restart a
cron job runs that does a checkconfig on the Nagios configuration ..
if the checkconfig fails, it touches a flag file .. the restart script
will then look for this flag and not restart if the flag file is
present.

In other words, there are many programmatic ways to ensure that a bad
restart does not happen, all are pretty straight-forward :).

- Max

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list