[Nagiosplug-devel] max_state logic?

John P. Rouillard rouilj at cs.umb.edu
Wed Sep 19 12:55:01 CEST 2007


In message <C310E149-07FF-4BFE-B0E5-2173A5D55E59 at altinity.com>,
Ton Voon writes:
>On 19 Sep 2007, at 08:13, Thomas Guyot-Sionnest wrote:
>> I was trying to replicate max_state from utils.c in Perl, but the  
>> logic there seems broken:
>>
>> int
>> max_state (int a, int b)
>> [...]
>> Given that, OK + UNKNOWN or OK + DEPENDENT will always return OK. Is
>> that right? IMO the OK test should be moved at the end.
>>
>
>Yes, that does look broken. I think DEPENDENT was a really old state,
>which I don't think should be used anymore, though I can see it is
>used in check_http and check_snmp. Anyone know the history of this?

Is state dependent = 4? 

IIRC in nagios, there are 5 states 0-4. State 4 was the code that was
used for B when host A is the parent of B and A is down
(I.E. reachability of B depended on A). But I think the state was
called unreachable or some such. I am not sure if a plugin can return
that, or if it was an internal nagios only thingy.

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.




More information about the Devel mailing list