Page 1 of 1

nrpe check_cpu filter=none not working

Posted: Fri Nov 06, 2015 7:14 am
by mcconvta
I am trying to return information about all CPU cores using nsclient nrpe - check_cpu command.

I am using

check_nrpe

-a “filter=none” "top-syntax=\${status}: CPU Load: \${problem_list}" "detail-syntax= %(core) %(time) - load %(load)%" “ok-syntax=${status} : CPU Load is OK ${list}” time=5m time=1m time=30s "warning=load > 90%" "critical=load > 95%"

Nagios XI is returning the error

CHECK_NRPE: Invalid packet type received from the server

If I remove "filter=none" the check works (but does not return individual cpu core information - only total information)

I have tried "filter='none'" and filter=none - I get the same error

Any ideas how to pass filter=none which works on the server in nsclient++ test mode

Regards Tony

Re: nrpe check_cpu filter=none not working

Posted: Fri Nov 06, 2015 1:57 pm
by rkennedy
Can you post the full command you are running through command line with check_nrpe -c check_cpu?

Re: nrpe check_cpu filter=none not working

Posted: Fri Nov 06, 2015 4:42 pm
by mcconvta
Yes the command is as above

From the command line on the server being monitored using nsclient in test mode - it will work - as follows

check_nrpe “filter=none” "top-syntax=${status}: CPU Load: ${problem_list}" "detail-syntax= %(core) %(time) - load %(load)%" “ok-syntax=${status} : CPU Load is OK ${list}” time=5m time=1m time=30s "warning=load > 90%" "critical=load > 95%"

but when i enter it in Nagios XI -it produces the error - but take out the "filter=none" and it works - but this is not what i want as i wish to display information on each core

note had to backslash the $ characters in Nagios XI


check_nrpe

-a “filter=none” "top-syntax=\${status}: CPU Load: \${problem_list}" "detail-syntax= %(core) %(time) - load %(load)%" “ok-syntax=${status} : CPU Load is OK ${list}” time=5m time=1m time=30s "warning=load > 90%" "critical=load > 95%"

Re: nrpe check_cpu filter=none not working

Posted: Sat Nov 07, 2015 6:47 am
by mcconvta
Forgot to add the command - it is check_cpu

Re: nrpe check_cpu filter=none not working

Posted: Sat Nov 07, 2015 6:52 am
by mcconvta
Further testing

I took out the detail-syntax and the query worked - so it is not the filter statement.

I added back the detail-syntax and it produced the error again.

So is it returning to much information when I add the detail-syntax?

How can I check the length of information allowed to be returned?

Re: nrpe check_cpu filter=none not working

Posted: Sun Nov 08, 2015 11:24 pm
by Box293
Generally speaking NRPE has a 1K limit on what is being returned.

You could turn on NSClient++ debug logging and see the full output that is being returned and check it from there.

Increasing the 1K limit is a bit frustrating and requires recompiling check_nrpe on the XI server, typically avoid it if you can.