[Nagiosplug-devel] RFC: New threshold syntax

Thomas Guyot-Sionnest dermoth at aei.ca
Wed Mar 19 19:06:59 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/03/08 01:28 PM, Ton Voon wrote:
> On 19 Mar 2008, at 09:56, Thomas Guyot-Sionnest wrote:
> 
>> So I just got a totally different idea: what if we make the  
>> thresholds a
>> set of parameters that can be processes by getsubopt?
>>
>> I haven't developed much this idea, but I'm thinking something like:
>>
>> check_stuff --metric  
>> min=2,warn_max=5,crit_max=7,outside,uom_prefix=Ki,uom=b
> 
> [...]
> 
> With a slight amendment to your idea, we get:
> 
> check_stuff --threshold name=time,warn=5:,crit=10:,uom=b
> 
> So --threshold is the "standard" option to set thresholds. The name=  
> sets which threshold.
> 
> However, I can't see a simpler way of defining the range. Your example  
> of 'outside' doesn't specify for warning or critical (I guess you  
> could do outside=warn, but then that doesn't scale with the (future)  
> list of ranges idea).

Is there's a real needs for a mix of inside and outside ranges in the
same thresholds? If so then fine, but keep in mind that this feature
alone make things much more complex.

I see you didn't like my min/max specifications... It's quite simple
though, and personally the only reason I'd avoid that would be to allow
multiple warning/critical ranges for the dame metric.

Another way to make is simple and possibly allow all the wanted feature
so far would be to separate the warn and crit ranges:

- --threshold name=cpu,type=warn,min=0,max=80,inside

>> here inside would be useless unless there's also a default inside
defined in in the same command

and if (and only if) we want to allow multiple ranges, then the same
metric could be repeated

- --threshold name=strange-metric,type=warn,min=20,max=40,outside
- --threshold name=strange-metric,type=warn,min=50,max=60,outside

so here strange-metric is only valid if within 20 to 40 or 50 to 60

- --threshold name=strange-metric,type=warn,min=inf,max=20,inside
- --threshold name=strange-metric,type=warn,min=40,max=50,inside
- --threshold name=strange-metric,type=warn,min=60,max=inf,inside

Here it would be similar but the actual exact values (20, 40, 50 and 60)
would be critical as well, right?

And if type= is omitted, default to crit. Again a name=defaults could
set defaults.

Also, the plugins that used to allow a list of thresholds could instead
expect a list on consecutive names, like name=1,[...] name=2,[...] or
name=oid1,[...] name=oid2,[...]


Final suggestion, to avoid having to type --threshold multiple times, we
could also allow [fill-in-word]-separated threshold parameter lists.
imho good candidates for the separator would be space and semicolon
(since we can't use the comma anymore).


Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH4VZD6dZ+Kt5BchYRAoeXAJ9DpTU6k4WNapZUZVav0DSyvGk09wCgjAtI
9lcbMkqoZjrvlg9AqHElLs0=
=p7qi
-----END PGP SIGNATURE-----




More information about the Devel mailing list