[Nagiosplug-help] Problems with check_icmp

Lutz_Rethberg Lutz_Rethberg at dresden-tourist.de
Sun Mar 13 02:37:03 CET 2005


I wont to make host-alive-check of a hosts, who is a unknown ( for me )
router behind the firewall. I don't know anything about him. He doesn't
answer for question by ssh, therefore I had the Idea to test him by icmp.
It works from command-line, but it doesnt work as checkkommand. Why ?


Details:
cause of:

bash-2.05$ /usr/local/nagios/libexec/check_icmp -H gw
check_icmp: Failed to obtain ICMP socket: Permission denied

I've set root-permissions, then it works from command-line as user nagios:

bash-2.05$ id
uid=987(nagios) gid=1(other)
bash-2.05$ /usr/local/nagios/libexec/check_icmp -H gw
OK - gw: rta 0.674ms, lost 0%|rta=0.674ms;200.000;500.000;0; pl=0%;40;80;;
bash-2.05$


Some of the Definitions:

checkcommands.cfg:
define command{
        command_name    check-icmp
        command_line    $USER1$/check_icmp -H $HOSTADDRESS$
        }

services.cfg
define service{
        use                     generic_service
        host_name               gw
        service_description     TK_GW_ICMP
        check_command           check-icmp
}


Result:


Current Status:   CRITICAL
Status Information: CRITICAL - 195.243.217.110: rta nan, lost 100%
Performance Data: rta=0.000ms;200.000;500.000;0; pl=100%;40;80;;
Current Attempt: 1/5
State Type: HARD
Last Check Type: ACTIVE
Last Check Time: 2005-03-13 11:02:23
Status Data Age: 0d 0h 0m 51s
Next Scheduled Active Check:   2005-03-13 11:07:23
Latency: 0.011 seconds
Check Duration: 3.857 seconds
Last State Change: 2005-03-12 19:51:07
Current State Duration: 0d 15h 12m 7s
Last Service Notification: N/A
Current Notification Number: 0
Is This Service Flapping?   NO
Percent State Change: 0.00%
In Scheduled Downtime?   NO
Last Update: 2005-03-13 11:03:05


Active Checks:   ENABLED
Passive Checks:   ENABLED
Obsessing:   DISABLED
Notifications:   ENABLED
Event Handler:   ENABLED
Flap Detection:   ENABLED

Thanks for help

Lutz rethberg





More information about the Help mailing list