Running a command when Nagios config changes

Ryan C Ash ryan.c.ash.lu4w at statefarm.com
Thu Jul 15 14:13:31 CEST 2010


We run on redhat linux and I use a common init script in
/etc/rc.d/init.d/<nagios>.  That would be an easy place to add that
additional script.  Currently it maintains our pnp4nagios, nsca
listener, ndoutils, etc. 



-----Original Message-----
From: Paul M. Dubuc [mailto:work at paul.dubuc.org] 
Sent: Wednesday, July 14, 2010 2:20 PM
To: Nagios Users List
Subject: [Nagios-users] Running a command when Nagios config changes

I would like to have some way of running a command only when Nagios is
started, or is restarted from the "Process Commands" menu, or any time
Nagios reloads its configuration files.  Is there a way to do this?  I
thought about writing it as a localhost service plugin that simply does
nothing if

$LASTSERVICECHECK$ > $PROCESSSTARTTIME$

but that doesn't seem optimal.  It this the best solution?  It would be
nice if I could write it as an event handler, but events are only for
host or service state changes.  This is a Nagios process state change.

------------------------------------------------------------------------
------
This SF.net email is sponsored by Sprint What will you do first with
EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
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

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
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