[Nagiosplug-help] check_ping: invalid hostname/address

Jim Avery jim at jimavery.me.uk
Tue Mar 15 19:54:32 CET 2011


On 15 March 2011 16:41, Michael Shoemaker <shoemake at ispalliance.net> wrote:
> Having some problems on a solaris box with check_ping, was hoping
> someone had some suggestions.
>
>
> /usr/local/nagios/libexec # ./check_ping -H localhost -w 3000.0,80% -c
> 5000.0,100% -p 1
> check_ping: Invalid hostname/address - localhost
> Usage:check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
>  [-p packets] [-t timeout] [-4|-6]


What does "ping localhost" do?  If that's broken as well then it's not
a problem with the plugin.

Does your local /etc/hosts file have a valid entry for "localhost"?

What's in /etc/resolv.conf ?  My memory of Solaris is a bit hazy, you
might need to check /etc/nsswitch.conf too if I recall.

Are you using NIS?

Have you tried running check_ping logged in as user "nagios"?

What happens if you run ./check_ping -H 127.0.0.1 -w 3000.0,80% -c
5000.0,100% -p 1 ?

Personally I always use IP addresses rather than names for Nagios
checks (except for check_http & similar) as name resolution is so
easily broken one way or another.

hth,

Jim




More information about the Help mailing list