check_icmp gives "failed to resolve"

Pete Siemsen siemsen at UCAR.EDU
Fri Jun 9 01:20:32 CEST 2006


On Jun 8, 2006, at 4:08 PM, Pete Siemsen wrote:

> According to the book "Nagios: System and Network Monitoring" by
> Wolfgang Barth, check_icmp is supposed to be a drop-in replacement
> for check_ping.  I had trouble making it work.  I've cc'd Wolfgang
> and the author of check_ping.  Thanks, guys!
>
> I run Nagios 2.4 with the 1.4.3 plugins on a Debian 3.1 system.
> Things were working fine with check_ping.  I bought Wolfgang's book
> and decided to try using check_icmp instead of check_ping.  I
> replaced all occurrences of "check_ping" with "check_icmp" in my
> config files.  I restarted Nagios and immediately got lots of errors
> like these in my logs:
>
> [1149802932] SERVICE ALERT: fileserver;PING;UNKNOWN;HARD;
> 2;check_icmp: Failed to resolve }
>
> The errors seem to appear only for hosts with minor DNS issues.  It
> seems that I got the error for any host with an "address" in the
> Nagios config files that didn't DNS reverse-resolve to the
> "host_name" in the config files.  I dramatically reduced the number
> of errors just by defining more domains in the "search" line in my /
> etc/resolv.conf.  This didn't take care of all the problems, though.
> I have host interfaces with DNS names like, "router1-eth4" but I want
> Nagios to represent the device as "router1".
>
> My command definition invokes check_icmp with $HOSTADDRESS$, not
> $HOSTNAME$, so why does check_icmp use DNS at all?
>
> -- Pete

Looking in check_icmp.c, I found the URL for the location of the latest
version.  I downloaded and installed it.  The number of problem hosts
went down, and the errors have a little more information:

[1149806794] SERVICE ALERT: noaa-router;PING;UNKNOWN;HARD; 
2;check_icmp: Failed to resolve }: Unknown host

Some of the "bad" hosts are reachable by pings from the command line,
using the IP address, the FQDN or the simple name of the host.  Others
simply have entries in the config files where the host_name doesn't  
match
the one that DNS supplies when the IP address is resolved.

-- Pete





_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list