Determining the success or failure of external commands

Scott Sanders lists at jssjr.com
Wed Jan 23 15:38:42 CET 2008


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.cmdpipe. 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.cmdfile 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 <ae at op5.se> 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                   andreas.ericsson at op5.se
> OP5 AB                             www.op5.se
> Tel: +46 8-230225                  Fax: +46 8-230231
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080123/6baddaa3/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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/
-------------- next part --------------
_______________________________________________
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