Could not interpret output from ping command

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
parshivets
Posts: 4
Joined: Mon Oct 03, 2011 7:15 am

Could not interpret output from ping command

Post by parshivets »

Hello. Have 3.3.1 Nagios Core and 1.4.15 nagios plugins.
When I try to make

Code: Select all

kohana-backup:/var/log/nagios # /usr/lib/nagios/plugins/check_ping -H 10.13.24.168 -w 100.0,20% -c 500,50% -p 5
Received
ping
CRITICAL - Could not interpret output from ping command
But ping command work normal.
What can I do with this?
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: Could not interpret output from ping command

Post by crfriend »

It looks like when the plugins were configured the configuration process could not figure out how to parse your ping executable's output and is therefore griping that it couln't understand it. What platform are you running your nagios instance on, and what does your ping executable produce, both for success and for failure?
parshivets
Posts: 4
Joined: Mon Oct 03, 2011 7:15 am

Re: Could not interpret output from ping command

Post by parshivets »

I have OpenSuse 11.4 . Nagios pluging were configured with option --with-ping-command=ping (without this plugs did't want configure). Don't understand second question. Normal ping work ok

Code: Select all

kohana-backup:~ # ping 10.13.1.1
PING 10.13.1.1 (10.13.1.1) 56(84) bytes of data.
64 bytes from 10.13.1.1: icmp_seq=1 ttl=255 time=0.479 ms
64 bytes from 10.13.1.1: icmp_seq=2 ttl=255 time=0.512 ms
^C
--- 10.13.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.479/0.495/0.512/0.027 ms
 
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: Could not interpret output from ping command

Post by crfriend »

You mention that if you didn't supply the "--with-ping-command" option at configuration time the configure would not complete. What error was it giving you?

On a Debian Linux system the configuration reported an auto-detected ping-command of "/bin/ping -n -U -w %d -c %d %s"; you might want to try that (the %d and %s parameters get replaced with numbers and the target address). Different systems can have different command-line syntaxes for "ping"; when in doubt, the manuals for your system will take precedence. In any event, what you want for a basic "ping" check is to send a single echo request with a distance-appropriate timeout period.
parshivets
Posts: 4
Joined: Mon Oct 03, 2011 7:15 am

Re: Could not interpret output from ping command

Post by parshivets »

Reinstall plugins with "/bin/ping -n -U -w %d -c %d %s"
Now I get from console

Code: Select all

kohana-backup:~/nagios-plugins-1.4.15 # /usr/lib/nagios/plugins/check_ping -H 10.13.24.168 -w 100,20% -c 100,20%
PING OK - Packet loss = 0%, RTA = 44.02 ms|rta=44.016998ms;100.000000;100.000000;0.000000 pl=0%;20;20;0
But from Nagios at browser - host information

Code: Select all

Host Status:	  DOWN   (for 76d 1h 38m 12s)
Status Information:	/bin/ping -n -U -w 30 -c 5 10.13.22.98
CRITICAL - Could not interpret output from ping command
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: Could not interpret output from ping command

Post by crfriend »

Well, there's been some progress. What you may be seeing now is a different way of calling the "check_ping" command for a host check than a service check. What nagios command are you using for the host check, and what is that command's translation into the system call? Compare that to what the service check's translation is and make modifications to the host check command definition appropriately. The other thing you might want to contemplate is to get "fping" and tell the configuration process that you have that facility and prefer it to the basic system-supplied "ping".

The "quick and dirty" would likely be to make the host check simply use the service "ping" check and be done with, but that will likely have pitfalls to it. Recall that in the modern world a "ping" is usually only useful to point out that the target is reachable, not "up and healthy".

This is rather interesting as I've never seen the basic "./configure" process miss the ping syntax so badly. Once you get this sorted you may want to publish your results so others might learn from them.
madpato
Posts: 3
Joined: Sat Dec 03, 2011 5:17 pm

Re: Could not interpret output from ping command

Post by madpato »

Hello

I do not mean to hijack this tread but i have EXACTLY the same problem, i have a debian lenny box and i keep getting the same error.

I have found searching in google some insights like changing the /bin/ping command to be executable with:
chmod u+s /bin/ping
But no luck for me. Also if i do this:
/usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 100.0,20% -c 500.0,60% -p 5
(Im testing it on a localhost) I get:
ping
CRITICAL - Could not interpret output from ping command
This is what i have in cgi.cfg in the ping sintax line:
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
If i do that in the command line it shows correct results. I hope you can help me, thanks.
Locked