Behavior of event handler - doesn't work alarm light

Takashi Maruyama maruyamt at
Wed Sep 7 11:33:54 CEST 2005

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
/usr/local/nagios/libexec/eventhandlers/notify-to-keiko-chan $HOSTSTATE$

# [ host section ]
define host{
        use                     generic-host
        host_name               local1-ATX135
        alias                   test local
        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 ]
echo $1, $2
case "$2" in
        case "$1" in
                rsh -l root RLY2 TurnOn -p dn1000
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:
[09-06-2005 22:03:21] HOST ALERT: local1-ATX135;DOWN;HARD;10;CRITICAL - Host
Unreachable (
[09-06-2005 22:03:18] HOST EVENT HANDLER:

3. Our Nagios install by tarball on

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 *

More information about the Developers mailing list