thoughts about event handlers

Paul L. Allen pla at softflare.com
Wed Jul 7 03:33:49 CEST 2004


Neil writes: 

> Steps:
> 1. use check_tcp to check port 80
> 2. If connection is refused, have the event handler get executed which 
> calls check_nrpe to check if httpd is running

Yes, you could do that if you are creative enough in the way you abuse
nagios. 

> What I am saying here is that, with event handlers, we can be very sure 
> that a service is really in a RUNNING STATE or in a STOPPED state. 

If you want to check if the process is running, use check_by_ssh or
NRPE or NCSA or any of the other alternatives to see if that process
is running.  If you want to check if a machine has a web server that is
accessible to the outside world then use check_http. 

If you want to try to figure out what is wrong, have a HUMAN BEING look
at the results of those two checks when one or both reports a problem.
What you're asking for is how to make nagios alert you in some bizarre
situation when httpd is running but the web server is not accessible from
the outside world.  Although this is unlikely, the things which could
cause the problem are diverse and you need a HUMAN BEING to figure out
what is causing it. 

The problem perceived by end users is that web sites are inaccessible, and
they don't care why, they just want it to be fixed.  Given that you need
a HUMAN BEING to figure out why the web sites are inaccessible even though
httpd is running, you might as well have that HUMAN BEING do a ps ax |
grep http as the first step in figuring out what is going wrong rather
than try to make nagios do something that won't help much anyway. 

What you're asking for is a lot of work to give you something that any
competent admin would do anyway as the very first step (taking seconds) in
a problem-solving exercise that could take many, many hours.  Been there,
done that, bought the T-shirt, had apache spawning children that died
within seconds (by your requirements, nagious would report that the web
sites are down but that httpd is running so there is no problem; the
reality is that things are severely borked). 

-- 
Paul Allen
Softflare Support 




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
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