Monitoring question

Formoso, Travis Travis.Formoso at blueslate.net
Wed Jan 17 16:09:39 CET 2007


> There are event handlers which, according to the docs, will run a 
> command to try and recover the service before sending a notification, 
> but I haven't (yet) implemented them, so you'd have to have a look at 
> the manual.  You'd need to write the script yourself, it's impossible 
> for Nagios to know how to bring a service up, or even if it was the 
> service that had failed and not an underlying problem, such as networking.

OK I tried to set up my first one today - testing the local host http from the sample provided on the page. Here is what I did.

define command{
        command_name    restart-httpd
        command_line    /usr/lib/nagios/plugins/eventhandlers/restart-httpd  $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
        }

Here is the services - not sure if this is correct.

# httpd-restart
define service{
 use                            generic-service

 host_name                      localhost
 service_description            HTTPD
 is_volatile                    0
 check_period                   24x7
 max_check_attempts             4
 normal_check_interval          1
 retry_check_interval           1
 event_handler                  restart-httpd
 contact_groups                 bssadmins
 notification_interval          120
 notification_period            24x7
 notification_options           w,u,c,r
 check_command                  check_ntp
}

I used the sameple script they provided: http://nagios.sourceforge.net/docs/2_0/eventhandlers.html

Now on the web interface it will say local host HTTPD: NTP CRITICAL: No response from NTP server.

So I am not sure why this was running when httpd did not go down and why I am getting a NTP error - I am sure things are set up wrong - just need to know what to change to test this out.




This e-mail and any files transmitted with it are for the sole use of
Blue Slate Solutions and the intended recipient(s) and may contain
confidential and privileged information. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
or any action taken in reliance on this e-mail is strictly prohibited
and may be unlawful.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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