[Nagiosplug-devel] check_ntp plugin

Subhendu Ghosh sghosh at sghosh.org
Mon Dec 30 09:38:02 CET 2002


On Wed, 18 Dec 2002, Jeremy T. Bouse wrote:

> 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


I think for the IPv6/IPv4 address resolution we should have the plugins 
accept a -4/-6 optarg to know which address resolution is preferred and 
call the appropriate routine.

Should prbably add -4/-6 to the set of reserved options inn the 
guidelines..

-- 
-sg





More information about the Devel mailing list