[Nagiosplug-devel] Nagios and JAVA plugins

William Leibzon william at leibzon.org
Fri Jun 28 20:24:35 CEST 2013


> Since I'm in the process of releasing version 2.x, my question is: do you think it would be better to keep using the old range format or would be better to use the new threshold specification ( http://nagiosplugins.org/rfc/new_threshold_syntax )?

The library I'm slowly working on
(https://github.com/willixix/WL-NagiosPlugins/blob/master/Naglio.pm)
which is currently incorporated inside check_memcached.pl and
check_redis.pl plugins is using the following syntax for long options
for thresholds:

--option=WARN:threshold,CRIT:threshold,ABSENT:OK|WARNING|CRITICAL|UNKNOWN,DISPLAY:YES|NO,PERF:YES|NO
And it supports few other keywords too -
ZERO:OK|WARNING|CRITICAL,NAME:string,PATTERN:string,UOM:char

The meanings are: ABSENT specifies if there should be alert at the
absence of what you're checking for (i.e. specified network interface
does not exist on a device), ZERO is special case when result is
numerical 0 (common enough special case), DISPLAY tells if the data
should be in included in nagios status line output and PERF if it
should be included in performance output. UOM is symbol to be added at
the end of perf output ('c' or '%'), NAME allows to specify custom
name for perfout and PATTERN only has meaning for my library (used for
regex matching of data as I allow to specify one option that would
match multiple data).

I added all of that entirely independent of the nagiosplugins proposal
but it seems similar and compatible. My library does not entirely
support proposed syntax as it doesn't understand 'inf' and doesn't
allow multiple WARN, CRIT and doesn't support 'OK'. But I'll probably
extend it to support all that as it seems simple enough to add given
what I've already written to support and parse this. And perhaps my
special keywords (ABSENT, DISPLAY, PERF) should be considered or
inclusion into proposed syntax.

William




More information about the Devel mailing list