[Nagiosplug-devel] Working on testcases
John P. Rouillard
rouilj at cs.umb.edu
Sat Nov 5 19:43:34 CET 2005
In message <450659ED-076A-4BD7-9E49-7E6E936F4DD7 at altinity.com>,
Ton Voon writes:
>On 4 Nov 2005, at 18:50, John P. Rouillard wrote:
>> Ton Voon writes:
>>> On 4 Nov 2005, at 17:58, John P. Rouillard wrote:
>>>> How about a flag to set the exit status in case of a failed lookup?
>>> What do you mean?
>> --dns-failure-status = CRITICAL
>> --dns-faulre-status = UNKNOWN
>> Then if a dns failure occurs, the user can set what they want the
>> exit status of the command to be.
>I see what you mean now. However, using this technique would mean
>that every plugin using hostname lookups would have to support this
>flag and I'm not sure that is a good idea.
Yeah, it does open a Pandora's box.
>And then what if you get a different kind of failure? A malloc call
>failure? A system call with unexpected results? A different flag for
>each?
Sadly this problem is caused by the mixing of two different functions
in a plugin:
communication with a device/service
analysis of device/service communication and assignment of
severity info into nagios.
There is no simple answer. With the SEC plugin I had put into v1 of
nagios, I could separate the two functions easily. SEC handled the
analysis of the plugin output, and the plugin talked to the device.
>I'm of the Keep It Simple philosophy so I think we need to decide
>whether "unexpected failures" should be UNKNOWN or CRITICAL.
>Unfortunately, I think your suggestion will take us to some
>complicated exceptions handling.
I agree.
>Anyway, what's the default setting? :)
I would say critical for DNS failure if DNS responds with a host
unknown. If you get a DNS timeout (no valid response), return
UNKNOWN. They should be testing DNS for functionality anyway if they
are using it. So the DNS failure to respond will be picked up by the
DNS check. The failure of DNS to resolve a host then is critical for
the reasons outlined (by you IIRC) in this thread.
-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
More information about the Devel
mailing list