[Nagiosplug-devel] RFC: New threshold syntax

Ton Voon ton.voon at altinity.com
Fri Apr 4 23:38:04 CEST 2008


On 3 Apr 2008, at 19:04, Vonnahme, Nathan wrote:
> I think you should add a section of other examples, because they
> demonstrate the readability and consistency which you're trying to
> solve.

Good idea. Added: http://nagiosplugins.org/rfc/new_threshold_syntax

> Do we maybe expect that a simple "OK" definition is inclusive of
> endpoints, but the warn/critical is exclusive?

For simplicity, I'd say all simple ranges are inclusive.

> Or is it that overlapping ranges should be evaluated from better to
> worse, so that ok=3..5,warn=2..6 works as expected ?

It is the rules that define the priority of the range calculation and  
hence alert level for overlapping ranges: http://nagiosplugins.org/rfc/new_threshold_syntax#state_rules

> That is, given
> this overlapping threshold definition:
>
> 	ok=3..5,warn=2..6
>
> we expect these values to give these results
>
> 	0:  CRITICAL
> 	1:  CRITICAL
> 	2:  WARN
> 	3:  OK
> 	4:  OK
> 	5:  OK
> 	6:  WARN
> 	7:  CRITICAL
> 	8:  CRITICAL
>
> I think if you swap rules #3 and #4 it would evaluate that example as
> expected, and it also solves the overlapping endpoints above.

I think the rules already give those exact results.

When I first thought about the rules, it seemed weird to have rule #3  
as critical, when you'd expect warning. But think of it this way: you  
are interested in defining success or failure; a shade of grey is when  
you're not too sure.

BTW, I added an extra "if an ok level is defined, return critical"  
because Thomas pointed out otherwise you can never get an ok status  
without an ok level defined.

> I think you also should change rule #1 (no levels specified) to return
> UNKNOWN

No - that should be OK, because I'm using that as the mechanism to  
decide that I want performance data to be graphed.

Maybe I shouldn't be overloading the threshold definition, but having  
no levels doesn't really make sense in any other context.

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