Wrong path for check_ping. Help!

Hi, everybody!
I’m trying to run Nagios 2b. It finally works, but I still have a problem with check_ping plugin(v1.4).
My check-host-alive and check_ping command-definitions both have a §USER1§-var on their path. And §USER1§ is pointing to /usr/local/nagios/libexec -directory (defined in my resource.cfg).
Nevertheless I get warnings in my nagios.log:

Warning: Attempting to execute the command "/bin/check_ping..."
:x Why does Nagios look for check_ping plugin in /bin :?: The hoststate of my testhost (localhost) is most of the time DOWN, but sometimes I catch it in state UP! And I have no idea, what's wrong! Please help! Lena

If I remeber right there’s been a thread recently with the same problem… but i don’t remeber what the issue was exactly.

Luca

I found this thread you mentioned before posting here and hoped to find someone who had a similar problem and could sort it out.
It’s [(http://www.meulie.net/forum_viewtopic.php?21.306.0)
](hyperlink url)
I think, I did all the definitions right, but check_ping still refers to /bin.
After hours of seeking (I’ve even searched the complete nagios directory for regexs like “ping” and s.o. to find any config-files I might have overseen) I still don’t know. :frowning:
At last I linked /bin/check_ping to usr/local/nagios/libexec/check_ping instead of copying it to /bin.
So, that’s how the things are. Please post, if you have any idea.
Thanks,
Lena

I used the search feature of this website, and found this link that explains your problem/fix completely.
meulie.net/forum_viewtopic.php?21.306.10

I’ll save you some work by quoting the relevant part here.
"This is what is in the “out of the box” minimal.cfg-sample file that comes with the nagios-2.0b2 and is most likely your problem.

Command to check to see if a host is “alive” (up) by pinging it

define command{
command_name check-host-alive
command_line /bin/check_ping -H $HOSTADDRESS$ -w 99,99% -c 100,100% -p 1
}

So if you used this sample, then you are going to have trouble, which is what I stated in your other thread. I have the new beta nagios working, and there are a few of these kind’s of buggy items."

Thanks for your reply.
The problem is, I have modified minimal.cfg:
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
}

And in ressource.cfg I have a $USER1$-definition:

$USER1$=/usr/local/nagios/libexec

That’s the problem! I can’t see, why Nagios refers to /bin. I’ ve made a workaround by linking /bin/check_ping and usr/local/nagios/libexec/check_ping, but I still wonder why I had to.
Lena