Service state macro problem

lubeg at mail.ru lubeg at mail.ru
Wed Dec 29 11:44:58 CET 2004


Hi all,

well, I have following configuration:

# nagios -V
Nagios 1.2
Copyright (c) 1999-2004 Ethan Galstad (nagios at nagios.org)
Last Modified: 02-02-2004

# uname -a
FreeBSD 5.3-STABLE #1: Wed Dec 15 15:28:53 UTC 2004 i386 KERNEL

# less services.cfg:
<skiped>
define service{
        use                             generic-ping
        host_name                       PROVIDER
        event_handler                   wakeup-reserve-link
        service_description             PING
        check_command                   check_ping
        }

# more checkcommands.cfg:
<skiped>:
define command{
        command_name    wakeup-reserve-link
        command_line    echo "$SERVICESTATE$" "$STATETYPE$" "$SERVICEATTEMPT$" >> /tmp/handler
        }


when I've added a rule in firewall which blocking icmp packets to my
provider from monitoring host I see in `/tmp/handler' the following:

# cat /tmp/handler:
 SOFT
<repeated 10 times>
 HARD
 HARD
OK HARD 1


Everything is ok with $SERVICETYPE$ but $SERVICESTATE$ is broken when
it should be 'CRITICAL'.

Everything is ok in notification area. I mean that $SERVICESTATE$
macro is working when notifications is sent.


Best regards.



-------------------------------------------------------
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://productguide.itmanagersjournal.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