Linux check_load invert or range check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Linux check_load invert or range check

Post by WillemDH »

Hello,

I need to check CPU Load on a host and alert when CPU load is lower then x, so I tried using the ':' and range 'x:x' warning and critical thresholds, but that does not appear to work?

At first it seemd to work:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H myserver -t 120 -c check_load -a '-w 16.0:,14.0:,12.0: -c 24.0:,22.0:,20.0:'
CRITICAL - load average: 6.79, 6.39, 6.24|load1=6.790;16.000;24.000;0; load5=6.390;0.000;0.000;0; load15=6.240;0.000;0.000;0;
But it seems like using a ':' always throws a critical.. :(

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H myserver  -t 120 -c check_load -a '-w 3.0:,2.0:,1.0: -c 4.0:,3.0:,2.0:'
CRITICAL - load average: 6.57, 6.35, 6.23|load1=6.570;3.000;4.000;0; load5=6.350;0.000;0.000;0; load15=6.230;0.000;0.000;0;
Someone has a suggestion how to do this?

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Linux check_load invert or range check

Post by ssax »

Looking at the code I don't think that it currently supports using : or ranges which is why it's not working properly.

https://github.com/nagios-plugins/nagio ... eck_load.c

I'm having trouble finding an alternative plugin that does support the thresholds/ranges.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Linux check_load invert or range check

Post by WillemDH »

Thanks for confirming Sean,

Created https://github.com/nagios-plugins/nagio ... issues/608
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Linux check_load invert or range check

Post by ssax »

Thank you for creating that!
Locked