Page 1 of 1

check_load with ncpa

Posted: Mon Mar 01, 2021 6:08 pm
by whuntt
Has anyone attempted to get check_load to work with the ncpa agent? I know that out of the box ncpa does not have a load check. But I have the check_load nrpe working (somewhat) with the check_xi_ncpa. However, regardless of the WARN and CRITICAL settings it will return always return a CRITICAL alert in the service check at XI.

From host CLI:

Code: Select all

/usr/local/ncpa/plugins
# ./check_load -w 5.0,10.0, 15.0 -c 10.0,20.0,25.0
OK - load average: 0.51, 0.78, 0.97|load1=0.510;5.000;10.000;0; load5=0.780;10.000;20.000;0; load15=0.970;10.000;25.000;0;
From XI:

Code: Select all

check_xi_ncpa!-t 'mytoken' -P 5693  -M 'plugins/check_load' -q 'args= '\'' -w 5.0,10.0,15.0 -c 10.0,20.0,25.0'\'''
CRITICAL - load average: 0.31, 0.68, 0.93

From XI CLI:

Code: Select all

./check_ncpa.py -H node060.internal -v -t 'mytoken' -P 5693 -T 120  -M 'plugins/check_load' -q 'args= '\''-w 1.0,5.0,7.0 -c 10.0,20.0,25.0'\'''
Connecting to: https://node060.internal:5693/api/plugins/check_load/?token=mytoken&check=1&args=+%27-w+1.0%2C5.0%2C7.0+-c+10.0%2C20.0%2C25.0%27
File returned contained:
{
    "returncode": 3,
    "stdout": "Parameter inconsistency: 1-minute \"warning load\" is greater than \"critical load\""
}
Parameter inconsistency: 1-minute "warning load" is greater than "critical load"

Re: check_load with ncpa

Posted: Tue Mar 02, 2021 5:44 pm
by vtrac
Hi,
Please try the below command.
Remember to replace "X.X.X.X" with your IP, and "YourToken".

Code: Select all

./check_ncpa.py -H X.X.X.X -v -t 'YourToken' -P 5693 -M 'plugins/check_load' -a '-w5.0,10.0,15.0 -c10.0,20.0,25.0'
Regards,
Vinh