[Nagiosplug-devel] Working on testcases

Andreas Ericsson ae at op5.se
Wed Nov 9 04:28:45 CET 2005


Ton Voon wrote:
> 
> On 7 Nov 2005, at 12:20, Andreas Ericsson wrote:
> 
>> I'd just like to point out that this is in no way incompatible with  
>> the "transport error" service-status, since nagios by default sets  
>> all out-of-bounds return codes to UNKNOWN.
>>
> 
> Andreas,
> 
> Just trying to make your suggestion clear: are you proposing  "transport 
> error" as another status from the plugins, but one that  Nagios will 
> (currently) support because it will map it onto UNKNOWN?
> 

Yes.

> I'm against adding another state unless absolutely necessary. I don't  
> think there is sufficient difference between UNKNOWN and  TRANSPORT_ERROR.
> 
> And while I agree with the idea of "transport errors", I'm not sure  if 
> we agree on the concept. In your previous email, you said "UNKNOWN  can 
> be used for user-error only", but then you contradicted yourself  by 
> saying when "a dns fails, the service *is* UNKNOWN".
> 

What I meant was that the service isn't in a determined state (i.e. 
"unknown" as humans read the word which isn't necessarily how Nagios 
understands it).

> I wonder if the word "UNKNOWN" is causing problems. Maybe "OTHER"  makes 
> more sense meaning "any other failure to stop analysis of the  service".
> 

Apparently it does. I don't think a change would be very welcome though.

> Any other opinions? This feels like it could be a big change that  could 
> impact how Nagios works so I want to make sure this is the  right route 
> to go.
> 

It needs lots and lots of testing. It would probably be better if Nagios 
did something along the lines of

	service_status = return_code & 0x3;
	plugin_flags = return_code & ~0x3;

This would mean that plugins would still only have 4 valid exit-codes, 
but could choose to pass on additional information to Nagios which would 
help users determine what went wrong (if the GUI supports it, ofcourse).

I'm not sure if this would break anything for now though, but if it does 
it'll have to wait until there's a new major release (i.e. 3.0). I don't 
think it's worth fiddling with right now.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231




More information about the Devel mailing list