how can i define check-sequences ?

Jim Avery jim at jimavery.me.uk
Sat Apr 18 20:11:42 CEST 2009


2009/4/18 Hussayn Dabbous <hussayn.dabbous at saxess.de>:
> But now i got one other problem, that is:
>
> Before a particular webapplication check can start, the associated host
> must be checked to be up.

I'm not sure I understand why this is an issue.  If the host is down,
it is normal for Nagios still to perform the service checks on that
host.  While the host is down the checks will still run but will fail
(this is true for active checks and it shouldn't be a problem for
passive checks either).  Nagios is intelligent enough not to send a
service notification if the host is down.

> Only if the host is OK, the webapplication-check shall execute.

> So how
> can i do this ?
>
> I would like to add a sequence into my test script, which asks nagios
> someting like
>
> "What status have you recently determined for host abc?"
>
> I could of course check the host status directly from my script, but it
> sounds much better to me, if i could
> ask nagios directly for the status information.

Assuming you really do need to do this (please forgive my skepticism)
then personally I would simply do a check_ping from within your
script.  If you must query the host status in Nagios, I expect the
easiest would be to use NDOUtils and have your script query the MySQL
database.

Don't forget that Nagios will do a host check anyway after the service
check fails, and if the problem is that the host is already down, it
won't send a service notification.

Cheers,

Jim

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
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