Unknown Ping Problem

Hi,

I just successfully (well, almost) set up a simple nagios setup with 1 host, 4 services, 1 contact, and 1 contact group. Everything worked flawlessly except for the ping command :x

My host IS up, however, the check_ping comes back with a status of “Unknown.” The status information gives me: /bin/ping -n -U -w 10 -c 67.15.xx.xx.

Am I missing something here? I set up Nagios on my other server, and everything worked just fine, and I’m pretty much using the same setup. Is the ping command wrong? Do I have to use ping6 instead…or maybe use some other flag options? Any help is appreciated.

Thanks,
– Chris

You didn’t give us much to go on, but I could make mine fail too, if i didn’t configure the .cfg files correctly.
So, this is how your .cfg files SHOULD be.
checkcommands.cfg
define command{
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 2
}

So, what is $USER1$ ? you ask?
resource.cfg should be:
$USER1$=/usr/local/nagios/libexec

My check_ping plugin is located in /usr/local/nagios/libexec like it’s supposed to be, and it has the correct permissions.
ls -la /usr/local/nagios/libexec/check_ping
-rwxr-xr-x 1 nagios nagios 54534 Jun 25 16:23 /usr/local/nagios/libexec/check_ping

nagios runs as user nagios and is group nagios, so yes, nagios will be able to execute the plugin.

Most likely your problem is this:
You didn’t define your checkcommands.cfg file check_ping command correctly. But since you didn’t give us anything but the problem, we have to guess.

Thanks for responding jakked, my bad for not providing examples.

My nagios installation is located in /usr/local/nagios/

Here’s my resource.cfg:
$USER1$=/usr/local/nagios/libexec

Here’s my check_commands.cfg:
define command {
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 2
}

My permissions for check_ping is:
-rwxr-xr-x 1 nagios nagios 52817 Oct 14 00:12 …/libexec/check_ping*

The wierd thing is that I have 3 other services check_ftp, check_http, and check_pop which are reporting without errors.

Thanks for the time and I appreciate any help.

– Chris

meulie.net/forum_viewtopic.php?21.1136.0

I used the search at the bottom of this forum, and found a possible solution.

Your check_ping plugin didn’t compile correctly and may not support the -U option.
I never use it anyway, so just get fping and use that instead.