[Nagiosplug-devel] [ nagiosplug-Bugs-946857 ] check_ping - output error

SourceForge.net noreply at sourceforge.net
Wed Jun 30 19:04:06 CEST 2004


Bugs item #946857, was opened at 2004-05-03 06:05
Message generated for change (Comment added) made by alex_b
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=946857&group_id=29880

Category: Argument proccessing
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Pumuckel1980 (pumuckel1980)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ping - output error

Initial Comment:
Hello,

I have some problems with the "nagios-plugins-
1.4.0alpha1". In this Version the check_ping plugin show 
me the following result:
"bin/ping -n -U -c 1 ntest2ext
Error: Could not interpret output from ping command"

It's OK when I use the "nagios-plugins-1.3.1.tar.gz".


./check_ping -H ntest2ext -w 3000.0,80% -c 
5000.0,100% -p 1 PING OK - Packet loss = 0%, RTA = 
0.22 ms
PING OK - Packet loss = 0%, RTA = 0.46 ms


Here are my differnet settings:

1.
nagios-plugins-1.3.1.tar.gz
##############################
= uname -a
"Linux *HOSTNAME* 2.4.22 #1 SMP Mit Okt 29 15:21:08 
CET 2003 i686 i686 i386 GNU/Linux"

=./check_ping -H *HOSTNAME* -w 3000.0,80% -c 
5000.0,100% -p 1 
"PING OK - Packet loss = 0%, RTA = 0.22 ms
PING OK - Packet loss = 0%, RTA = 0.48 ms"

2. 
"nagios-plugins-1.4.0alpha1"
##############################
= uname -a
"Linux *HOSTNAME* 2.4.22 #1 SMP Mit Okt 29 1:21:08 
CET 2003 i686 i686 i386 GNU/Linux"

=./check_ping -H ntest2ext -w 3000.0,80% -c 
5000.0,100% -p 1
"/bin/ping -n -U -c 1 ntest2ext
Error: Could not interpret output from ping command"


thanks for help
bye

----------------------------------------------------------------------

Comment By: Alex Burger (alex_b)
Date: 2004-06-30 22:03

Message:
Logged In: YES 
user_id=85836


I am using Nagios-1.2 with nagios-plugins-1.3.1 and I am
having a similar problem.

On my Mandrake 9.2 system, host notifications for DOWN are
showing the command line instead of the plugin output
although the output for UP is correct.  For example:

[1088427108] HOST ALERT: server01;DOWN;SOFT;1;/bin/ping -n
-U -c 1 server01
[1088427135] HOST NOTIFICATION:
alex;server01;DOWN;host-notify-by-email;/bin/ping -n -U -c 1
server01
[1088427305] HOST NOTIFICATION:
alex;server01;UP;host-notify-by-email;PING OK - Packet loss
= 0%, RTA = 0.28 ms

The host is using 'check-host-alive' which uses the
following command line:

/usr/local/nagios/libexec/check_ping -H $HOSTADDRESS$ -w
5000,100% -c 5000,100% -p 1

It looks like check_ping is expecting the 'From 10.36.39.219
icmp_seq=1 Destination Host Unreachable' message to be sent
to STDERR from ping, but on my system it goes to STDOUT.

To test, I created a script that outputs to STDERR a ping
result, and changed check_ping to call my script instead:

#!/usr/bin/perl
select STDERR;
print "From 192.168.1.1 icmp_seq=1 Destination Host
Unreachable\n";
print "\n";
print "--- 192.168.1.1 ping statistics ---\n";
print "echo 1 packets transmitted, 0 received, +1 errors,
100% packet loss, time 0ms\n";

Calling check_ping, I get the correct output:

PING CRITICAL - Host Unreachable

If I changed the script by removing 'select STDERR', I get:

Error: Could not interpret output from ping command

Looking at the source code, if it can not interpret the
output it outputs the command that was executed instead, for
troubleshooting purposes I assume.

Alex



----------------------------------------------------------------------

Comment By: Pumuckel1980 (pumuckel1980)
Date: 2004-05-03 08:18

Message:
Logged In: YES 
user_id=1034118

added:

here is the output of the ping command:
[root at pb3 nagios-plugins-1.4.0alpha1]# /bin/ping -n -U -c 1 
192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_seq=1 ttl=255 time=0.243 ms

--- 192.168.1.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.243/0.243/0.243/0.000 ms


At the moment I've test the CVS Version (1.27) of the 
check_ping command. With this there is the same error like in 
the "nagios-plugins-1.4.0alpha1" package.

thanks
bye

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=946857&group_id=29880




More information about the Devel mailing list