Can't you set flexible recurring downtime to solve this? Ie: If the MySQL Database goes down between Midnight and 4am, start a downtime window that last for 1 hour. If the DB is still down after an hour, send an alert.
I wrote a PHP script you can use in cron to schedule such a downtime event: http://www.nagiosexchange.org/Downtimes.38.0.html?&tx_netnagext_pi1[p_view]=628 http://nagios.sourceforge.net/docs/2_0/downtime.html On Wed, 2008-01-23 at 09:38 -0500, Scott Sanders wrote: > In my case, a backup job might take down a MySQL database for anywhere > from 1 minute to 1 hour, depending on the size of the database. > Because the time needed to perform the backup is flexible and the time > when the backup might occur is not always known, I cannot simply set > the affected services to only notify in a timeperiod that excludes > certain hours of the days. This is just an example of why I need to > allow scripts and applications not on the nagios host(s) to be able to > use the external command pipe. > > Currently I have a very simple API over https that uses the same auth > mechanism as the Nagios frontend, and PHP classes that I can use in my > client side scripts to manipulate this API. I am able to query Nagios > about object data and status data, as well as submit commands to the > nagios.cmd pipe. In order for the external command functionality to > work the way I intend, I need to obtain a response from nagios so my > server can respond back to the client with the results of processing > the external command. I am really hoping there is an easy way to do > this, as replacing the nagios.cmd file with something besides a FIFO > pipe requires modification to the nagios source and is something I was > trying to avoid. > > Thanks for the response. I hope this makes sense. > > -Scott > > On 1/23/08, Andreas Ericsson <[EMAIL PROTECTED]> wrote: > Scott Sanders wrote: > > Hi, > > > > I am working on implementing some functionality that will > allow me to safely > > expose nagios.cmd to external hosts. In my environment there > are maintenance > > tasks that run periodically which disrupt certain services, > causing nagios > > to start generating alerts. Needless to say, I am tired of > having my cell > > phone go crazy when this happens. > > In that case, why not ask "How do I keep my cellphone from > waking me up?"? > Instead, you've thought up a solution to your problem, which > generates > other problems, and now you want help solving those other > problems. > > Assuming you know when these disruptive tasks are run, you > should simply > create a notification_period that doesn't include the > sensitive hours > and use that notification_period for the services being > disrupted. > > There are other solutions too, but this one is normally the > recommended, > so I suggest you try that out first. > > -- > Andreas Ericsson [EMAIL PROTECTED] > OP5 AB www.op5.se > Tel: +46 8-230225 Fax: +46 8-230231 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ Nagios-users mailing list > Nagios-users@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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nagios-users mailing list Nagios-users@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