[Nagiosplug-devel] RFC: New threshold syntax

Ton Voon ton.voon at altinity.com
Tue Mar 18 10:04:27 CET 2008


On 18 Mar 2008, at 04:36, Max wrote:

> I think your idea to extend the syntax is a good one :), I personally
> have found myself more and more using a syntax in this format
>
> -w 'metric<op>number:metric2<op>number'
>
> e.g.
>
> -w '1min>15:5min>5' -c '15min>15:5min>10'
>
> "Warn if 1 minute load is greater than 15 or 5 minute is greater than
> 5, critical if 15 minute is greater than 15 or 5 minute is greater
> than 10'
>
> this lets a user specify a fairly complex or'd syntax for complex
> thresholds .. the separator could determine or vs. and.

So I guess in the proposed format, this would be:

--load1=/15: --load5=10:/5: --load15=15:

Is that easier to read? I guess for me it is :)

I like the > symbol, but it is overloading an existing shell meaning,  
which is why I avoided it.

Currently, my proposal only supports an OR of the threshold checks,  
but I guess we could easily add a flag to change to AND instead.

> I too find that just using simple single numbers does not do well for
> 'check all' types of plugins .. plugins that check multiple metrics at
> once, it is a limitation that forces inefficiencies when adding
> service checks for Nagios .. if an element type, for example, CPU
> utilization, has 3 metrics associated with it (1 min, 5 min, 15 min),
> I want to check those all at once with one plugin, not have Nagios
> make 3 calls to the same plugin just to check all 3 ...

Agreed. For one customer, they want to check that there is a single  
process and alert if vsz > 100MB OR cpu > 30%. They currently have to  
run this as 3 checks:

   ./check_procs -u user -C command -c 1:1
   ./check_procs -u user -C command --metric=VSZ -c 100000
   ./check_procs -u user -C command --metric=CPU -c 30

So I'm trying to get check_procs to allow the following:

./check_procs -u user -C command --number=^1:1 --vsz=100000 --cpu=30

> I really like that plugins have guidelines and that Nagios takes a
> keep things simple approach but I also think we need as a community to
> have guidelines that allow developers to create efficient checks, more
> and more we see 'check all' types of checks that could really benefit
> from specifying multiple metric thresholds per warning and critical
> ranges ..

What ideas do you have? I see the plugins team mission is to create a  
great set of re-usable frameworks (the C library functions and  
Nagios::Plugin for perl) and some of the most commonly used plugins  
that showcase the frameworks.

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