[Nagiosplug-devel] r1879: check_tcp now returns UNKNOWN with an invalid hostname on command line

Ton Voon ton.voon at altinity.com
Tue Jan 8 14:39:19 CET 2008


On 8 Jan 2008, at 12:27, Thomas Guyot-Sionnest wrote:

> The arguments goes in both ways. It is fair to think name resolution
> belongs to check_dns, and in my setups I use IPs everywhere I can and
> the dns servers have their own checks. I didn't push my vote towards  
> the
> reversal of your commit because some other plugins I checked goes
> UNKNOWN on invalid hosts too.
>
> The developer guideline should be clear on this (if it's not already)
> and plugins not following the specs should be fixed.

We did have an argument a long time ago about whether an invalid host  
is a CRITICAL or an UNKNOWN. I argued for UNKNOWN because a name  
resolution doesn't mean that the host is not there.

Ethan and others (who I can't recall) argued for CRITICAL and that was  
the consensus, hence the decision to set the text in the guidelines as  
UNKNOWNs:

Invalid command line arguments were supplied to the plugin or low- 
level failures internal to the plugin (such as unable to fork, or open  
a tcp socket) that prevent it from performing the specified operation.  
Higher-level errors (such as name resolution errors, socket timeouts,  
etc) are outside of the control of plugins and should generally NOT be  
reported as UNKNOWN states.

> I don't believe this should apply for plugin that use a protocol to
> check something behind it (i.e. check_snmp, check_nrpe, check_by_ssh,
> check_nt). It that case this should be UNKNOWN with optionally the
> possibility to return CRITICAL on protocol unreachable. So instead of
> setting 10 thousand dependencies in Nagios you can just have one check
> for the protocol (using the CRITICAL option or negate) and all other
> returning UNKNOWN when unreachable - this ways you won't get a "pager
> bomb" then the service does down ;)

It means that you have to have at least 1 other check of the protocol  
setup in Nagios, which is not always the case. I personally agree with  
this, but not sure if it should be in the guidelines.

Ton

http://www.altinity.com
UK: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: tonvoon





More information about the Devel mailing list