[Nagiosplug-devel] New Threshold Formats

Richard Edward Horner rich at richhorner.com
Thu Oct 2 18:11:41 CEST 2008

After my asking about the proposed new threshold formats, Thomas was
kind enough to link me the latest available version of the RFC which
is here:


Here are some quick thoughts. Some of these are just semantics but
there are a couple things that appear to me to be errors but maybe I'm
just not reading them correctly or maybe I need more sleep.

First range format is defined as:

Simple ranges are of the format:



    * start and end must be defined
    * start and end match the regular expression
/^[+-]?[0-9]+\.?[0-9]*$|^inf$/ (ie, a numeric or "inf")
    * alert is raised if value is inside start and end range

And then examples are given like:

check_procs -C httpd --vsize ok=0..8096,warn=8097..16182

So, the regular expression appears to not match the examples and it
also appears that it would match some things that do not fit the
requirements. All the examples have two dots separating the boundary
points and require both a start and end. The regular expression
appears to make the end optional through making the dot (singular, not
dual in the given examples) optional and then the second [0-9] is
starred making it optional by allowing for zero characters there.

Additionally, this regex does not allow for ranges that end with a
negative value. It is conceivable that you might need to check
something like:


Or perhaps more likely:


The other thing is semantic. It says "alert is raised if value is
inside start and end range" but these range specifications are general
including for OK so in the case of that match, an alert would not be
raised. I think it should say, "range is matched/satisfied if the
value is inside the start and end".

Thanks, Rich(ard)
Richard Edward Horner
Engineer / Composer / Electric Guitar Virtuoso

More information about the Devel mailing list