[Nagiosplug-devel] check_ntp plugin

Jeremy T. Bouse Jeremy.Bouse at UnderGrid.net
Wed Dec 18 18:20:03 CET 2002


On Wed, Dec 18, 2002 at 11:21:26AM +0100, Leif Nixon wrote:
> Rhys McWilliams <rhys at ananzi.co.za> writes:
> 
> > However, I have just run into one minor problem with the check_ntp plugin.
> > It seems that the plugin does not like the underscore character in the
> > hostname specified with the -H option.
> > 
> > Am I just being stupid about this (I use the underscore in quite a few of my
> > host names in the /etc/hosts)?
> > If not, is there a chance of this being fixed? 
> 
> Underscores are illegal in DNS, so it is generally not a good idea
> to use underscores in hostnames.
> 
> Anyway, Nagios should give the host IP to the plugin, not the
> hostname, shouldn't it?
> 
	I was gonna make the comment that underscores are illegal in
DNS but figured someone else would do so as well... As for whether the
plugin is given the IP or the hostname depends on how you declare your
hosts in the configuration... If you give it a hostname it will try to
check the hostname, while if you give it an IP address it takes it as
the literal address...

	I really worked on this in my AF-independent code as it would
add interesting side effects... If you gave it an IPv4 address it was
obvious which protocol to use; likewise if you gave it an IPv6 address
it would know which protocol you were using... The fun began if you gave
it a hostname which could  be either IPv4 only, IPv6 only or both IPv4
and IPv6... 

	Jeremy




More information about the Devel mailing list