Could not interpret output from ping command

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Could not interpret output from ping command

Postby parshivets » Mon Oct 03, 2011 7:20 am

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

Re: Could not interpret output from ping command

Postby crfriend » Tue Oct 04, 2011 9:12 am

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?
crfriend
 
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)

Re: Could not interpret output from ping command

Postby parshivets » Tue Oct 04, 2011 9:32 am

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

Re: Could not interpret output from ping command

Postby crfriend » Wed Oct 05, 2011 6:42 am

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.
crfriend
 
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)

Re: Could not interpret output from ping command

Postby parshivets » Wed Oct 05, 2011 7:49 am

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

Re: Could not interpret output from ping command

Postby crfriend » Thu Oct 06, 2011 4:55 pm

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.
crfriend
 
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)

Re: Could not interpret output from ping command

Postby madpato » Sat Dec 03, 2011 5:24 pm

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.
madpato
 
Posts: 3
Joined: Sat Dec 03, 2011 5:17 pm


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 19 guests