[Nagios-devel] Behavior of event handler - doesn't work alarm

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Behavior of event handler - doesn't work alarm

Post by Guest »

I can only think of permissions issues. Try doing a su nagios and
running the same test.

/usr/local/nagios/libexec/eventhandlers/notify-to-keiko-chan DOWN HARD

Best of luck !

Thanks.
Sumit Malhotra
Data Armor


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Takashi
Maruyama
Sent: Wednesday, September 07, 2005 3:04 PM
To: [email protected]
Subject: [Nagios-devel] Behavior of event handler - doesn't work alarm
light




Dear sir,

I'm testing watching system by Nagios 2.0B4 with Fedora Core 4.

It work fine to watch ping check of some hosts and routers. Then, I
modify
configuration file since I try to make notify by alarm light when Nagios
detect
host or router error event.
But it doesn't work and current configuration is as follows;

[minimal.cfg, from sample configuration file for hosts, services]

# [ command section ]
# Notify alarm for Keiko-chan mini

define command{
command_name notify-to-keiko-chan
command_line
/usr/local/nagios/libexec/eventhandlers/notify-to-keiko-chan $HOSTSTATE$
$STATETYPE$ $HOSTATTEMPT$
}

# [ host section ]
define host{
use generic-host
host_name local1-ATX135
alias test local
address 172.17.0.150
check_command check-host-alive
max_check_attempts 10
event_handler notify-to-keiko-chan
notification_interval 120
contact_groups admins
}

[notify-to-keiko-chan, sh script for alarm light ]
#!/bin/sh
#
#
#
echo $1, $2
case "$2" in
HARD)
case "$1" in
UP)
;;
DOWN)
rsh 172.17.20.1 -l root RLY2 TurnOn -p dn1000
;;
esac
;;
esac
exit 0

- - - - -

1. "notify-to-keiko-chan" script work fine individually. For example,
"notify-to-keiko-chan DOWN HARD"

2. On nagios.log, it seem to see work fine, that is Nagios detect error
and do
event handler when host has error.
[09-06-2005 22:03:21] HOST EVENT HANDLER:
local1-ATX135;DOWN;HARD;10;notify-to-keiko-chan
[09-06-2005 22:03:21] HOST ALERT: local1-ATX135;DOWN;HARD;10;CRITICAL -
Host
Unreachable (172.17.0.150)
[09-06-2005 22:03:18] HOST EVENT HANDLER:
local1-ATX135;DOWN;SOFT;9;notify-to-keiko-chan

3. Our Nagios install by tarball on www.nagios.org.

4. Also our alarm light is worked by linux and accept rsh command. on
event log
of alarm light, no event from nagios.


If anyone know how do I debug event handler, will you advise me?


Thank you for your help,


Takashi Maruyama

Aucnet Inc.
IT Department





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/lis ... gios-devel






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked