[Nagiosplug-help] check_ping: invalid hostname/address

Michael Shoemaker shoemake at ispalliance.net
Tue Mar 15 20:07:19 CET 2011


# ping localhost
localhost is alive

# grep localhost /etc/hosts
127.0.0.1       localhost

resolv.conf contains the nameservers we use (all valid)

we are not using nis, but the hosts entry is below (just in case)
hosts:      files dns


# ./check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1
check_ping: Invalid hostname/address - 127.0.0.1
Usage:check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
  [-p packets] [-t timeout] [-4|-6]

I had checked the ip prior, I just forgot to include it in the notes.


On 03/15/2011 02:54 PM, Jim Avery wrote:
> 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
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>




More information about the Help mailing list