[Nagiosplug-devel] RFC: New threshold syntax

Thomas Guyot-Sionnest dermoth at aei.ca
Tue Mar 18 07:13:00 CET 2008


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

On 17/03/08 05:15 PM, Ton Voon wrote:
> Hi!
> 
> I tried to get this through last year, but I don't think a conclusion  
> was reached so I'm going to try again now!
> 
> This is a proposal for a new threshold syntax. My motivation is that I  
> have to update check_procs based on a customer's requested use for it.  
> I'd like a generally applicable syntax, so that there is maximum code  
> reuse and consistency.
> 
> The proposal is here: http://nagiosplugins.org/rfc/new_threshold_syntax
> 
> I've decided to use the website as this can be the master document. I  
> plan on updating it based on people's comments. Hopefully it will not  
> require too many alterations!

Thanks Ton,

It looks great, but I have a few comments:

The threshold format should possibly include a separator (I vote for the
comma, ",", the usual separator for arguments) since some plugins
expects multiple successive thresholds (like check_snmp). Those would be
only accepted by a 2nd function that would return an array of thresholds
struct. Omitting thresholds would be allowed the usual way (if I get it
properly) with a slash and optional uom (ex: "/,20:/30:k,/M"). If the
regular function is used the thresholds would be rejected.

*** Added after reading some more ***
I thought the / was always required. Your check_http example isn't very
clear if you specify warning or critical thresholds.



I believe uom/prefix for controlling the unit used for printing is a
good idea but:

1. we should define what is allowed. Should probably be a subset of this:
http://physics.nist.gov/cuu/Units/prefixes.html
2. Do we allow base8 units (Ki, Mi, etc)?
3. Do we allow a unit after the prefix? I think it's metric-specific, so
I wouldn't think so (despite your examples). If yes and 2, how do we
specify a 'i' unit? what if the unit you want is a valid prefix?
4. I believe uom should only affect the plugin output. The performance
data should be as precise as possible, ideally in scientific notation. I
also think it shouldn't change, because parsers would then need to find
the uom to properly  See my check_memory plugin in nagiosexchange for
example.



It would be nice to have another prefix (that goes before, after or
without the caret) to specify whenever the specified values should be
alerted on or not (inclusive vs exclusive)... Maybe a pound (#). Just I
suggestion - I'd personally use that sometimes.



I dislike the choice of inf or colons to denote infinity. I'd prefer we
stick on either one of them.



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

iD8DBQFH311s6dZ+Kt5BchYRArNsAKDidboi2KGjj5sleCQoWD1AohEnrQCfSPzv
aNPt1xhkHO+VKK24Fa9ZLXM=
=O5r6
-----END PGP SIGNATURE-----




More information about the Devel mailing list