Howto force a notification (before the schedul ed renotify time) for a down host/critical service ?

Tedman Eng teng at dataway.com
Thu Jul 13 03:32:03 CEST 2006


One way to do this is to set up a queuing system separate from nagios, ie
using cron.
During normal hours, 5am-12midnight, nothing's changed.  During sleepytime,
we instead echo the notifications to a file, and then later run all the
queued notifications at the desired time from cron.

Here's a quick hack:

1. The normal contact:
        5am-12am, executes "notify-by-email"
   Create a new "queued" contact:
        12am-5am, executes "notify-by-email-queued"

2. notify-by-email = /usr/bin/mail $CONTACT$ -s $HOST$ is $STATUS$
   notify-by-email-queue = echo "/usr/bin/mail $CONTACT$ -s $HOST$ is
$STATUS$" >> /tmp/queue

3. Set up a cron entry to run the queued notifications
   0 5 * * * sh /tmp/queue;rm /tmp/queue



(note: arbitrarily running a file from /tmp is not secure)




> -----Original Message-----
> From: Stanley.Hopcroft at Dest.gov.au 
> [mailto:Stanley.Hopcroft at Dest.gov.au]
> Sent: Tuesday, July 11, 2006 4:40 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Howto force a notification (before 
> the scheduled
> renotify time) for a down host/critical service ?
> 
> 
> Dear Folks,
> 
> How can I have Nagios (2.4) send a notification ahead of the scheduled
> time for next notification ?
> 
> I would like to do this to send out notifications after a period of
> no-notifications ends (we
> have the view that people do not react well to even major 
> crises between
> about midnight and 4-5 am so
> we don't send notifications during that period. However it 
> would be nice
> to send out all the
> notifications for outages that occurred in the 
> no-notification period at
> 5 am).
> 
> At the moment we send a summary of outstanding faults generated by
> nagiostats (very useful,
> but I think it would be better to actually notify about all the extant
> problems above
> a certain severity. 
> 
> Since status.dat has all this information, it is not difficult to find
> whats not up.
> 
> However, there does not appear to be an external command to do
> notification.
> 
> The closest I could find
> (http://www.nagios.org/developerinfo/externalcommands/commandlist.php)
> appears to be SET_NOTIFICATION_NUMBER.
> 
> Your comments are most welcome.
> 
> Thank you,
> 
> Yours sincerely.
> 
> 
> --------------------------------------------------------------
> -----------
> Using Tomcat but need to do more? Need to support web 
> services, security?
> Get stuff done quickly with pre-integrated technology to make 
> your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on 
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
dat=121642
_______________________________________________
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


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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