host event notifications
Robert.Lattanzi at fitchratings.com
Robert.Lattanzi at fitchratings.com
Thu Mar 10 20:11:32 CET 2005
hello all-
i have about 50 network devices that i am monitoring. each one is
configured as a host, with the check_command defined as check-host-alive.
in addition, i have a ping of each device defined as a service, with
event_handler enabled and set to "networkdevice-notify-by-epager", a custom
script which dials a skytel paging server and sends directly to our pagers.
the event handler works from the command line (as user nagios) and i get no
complaints from nagios at startup about incorrect or nonexistent commands.
my first question is, is the ping service necessary? it doesn't seem
as if it is. all i want to know is if each of the network thingies is up.
check-host-alive should suffice, no?
second, and more pressing, is that when testing all of this against a
"fake" IP address (sure to return a CRITICAL error), neither my host event
handler nor the service event handler gets triggered. The host shows up as
CRITICAL in the UI, but nothing else happens. Moreover, I see the event
handler for the host being called in nagios.log, but that's where it ends.
Below are config file snippets. Thanks in advance, Robert
hosts.cfg entry:
define host{
use generic-host
host_name test
alias test
address 193.168.4.36
check_command check-host-alive
event_handler networkdevice-notify-by-epager
event_handler_enabled 1
max_check_attempts 1
notification_interval 480
notification_period 24x7
notification_options d,u,r
}
services.cfg entry:
define service {
use generic-service
host_name test
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups linux-admins-dialpager
notifications_enabled 1
notification_period 24x7
notification_options c,r
check_command check_ping!100.0,20%!500.0,60%
event_handler networkdevice-notify-by-epager
}
miscommands.cfg entry:
define command{
command_name networkdevice-notify-by-epager
command_line /usr/bin/snpp -m "$HOSTNAME$ (IP: $HOSTADDRESS$)
is $HOSTSTATE$ Info: $OUTPUT$ Time: $DATETIME$" $CONTACTPAGER$
}
Robert Lattanzi
FitchRatings
212.908.0348
Confidentiality Notice: The information in this e-mail and any attachment(s) is confidential and for the use of the addressee(s) only. If you have received this e-mail in error, please delete this e-mail. Unauthorized use, reliance, disclosure or copying of the contents of this e-mail, or any similar action, is prohibited.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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