Page 1 of 2

NCPA 1.7.2 CPU 100%

Posted: Wed Nov 26, 2014 9:01 am
by AMacintosh
We are seeing an incorrect CPU Usage result on a Windows 2008 R2 server. It keeps reporting 100% CPU usage however the server perf mon log and Task Manager do not show this issue. When I look at the Top Processes tab in the agent on that server, it keeps flashing CPU Load: 100%. If at the same time, I have task manager open, I don't see this spike. There only appears to be one CPU on this VM.

Re: NCPA 1.7.2 CPU 100%

Posted: Wed Nov 26, 2014 10:28 am
by lmiltchev
Can you run the following commands and show us the output?

On the Windows box (from the CMD)

Code: Select all

wmic cpu get loadpercentage
On the Nagios XI server (from the CLI)

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <client ip> -t 'token' -P 5693 -M cpu/percent -w 80 -c 90

Re: NCPA 1.7.2 CPU 100%

Posted: Wed Nov 26, 2014 10:41 am
by AMacintosh
Please see the results...

Load Percentage
5

[]# /usr/local/nagios/libexec/check_ncpa.py -H 10.0.0.0 -t 'token' -P 5693 -M cpu/percent -w 80 -c 90
CRITICAL: percent was 100% | 'percent_0'=100%;80;90;
[]# /usr/local/nagios/libexec/check_ncpa.py -H 10.0.0.0 -t 'token' -P 5693 -M cpu/percent -w 80 -c 90
OK: percent was 2% | 'percent_0'=2%;80;90;

Re: NCPA 1.7.2 CPU 100%

Posted: Wed Nov 26, 2014 12:17 pm
by lmiltchev
So, the first check "failed", but the second one didn't. What is the output when you try to increase verbosity?

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 10.0.0.0 -t 'token' -P 5693 -M cpu/percent -w 80 -c 90 -vvv
What is the value that you see in the API?

Code: Select all

https://clientip:5693/api/cpu/percent
Can you upload the "ncpa_listener.log" from the Windows box, so that we can take a look at it?

Re: NCPA 1.7.2 CPU 100%

Posted: Mon Dec 01, 2014 7:50 am
by AMacintosh
I ran the checks immediately right after each other and it shows that the value for CPU load is flapping between 100%. I'll check the API and the command line check with -vv and get back to you.

Re: NCPA 1.7.2 CPU 100%

Posted: Mon Dec 01, 2014 1:10 pm
by lmiltchev
I'll check the API and the command line check with -vv and get back to you.
No problem.

Re: NCPA 1.7.2 CPU 100%

Posted: Wed Dec 03, 2014 7:47 am
by AMacintosh
Please see the results of 3 fast command line checks.

[root@nastisrnagap01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H 10.0.0.0 -t 'token' -P 5693 -M cpu/percent -w 80 -c 90 -vvv
CRITICAL: percent was 100% | 'percent_0'=100%;80;90;
[root@nastisrnagap01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H 10.0.0.0 -t 'token' -P 5693 -M cpu/percent -w 80 -c 90 -vvv
CRITICAL: percent was 100% | 'percent_0'=100%;80;90;
[root@nastisrnagap01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H 10.0.0.0 -t 'token' -P 5693 -M cpu/percent -w 80 -c 90 -vvv
OK: percent was 2% | 'percent_0'=2%;80;90;

Re: NCPA 1.7.2 CPU 100%

Posted: Wed Dec 03, 2014 7:57 am
by AMacintosh
The API is showing either 0% or 100% when refreshing.

Ideas?

Edit: NCPA listener log

Re: NCPA 1.7.2 CPU 100%

Posted: Wed Dec 03, 2014 10:17 am
by slansing
Were you trying to attach your log? Does not look like it got through.

Re: NCPA 1.7.2 CPU 100%

Posted: Thu Dec 04, 2014 8:49 am
by AMacintosh
Yeah it won't allow me to upload the log. here are the latest entries.

Code: Select all

2014-12-03 08:15:13,773:INFO:handler:NagiosIP - - [2014-12-03 08:15:13] "GET /api/disk/logical/D:|/used_percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 325 0.000000
2014-12-03 08:15:14,319:DEBUG:handler:Initializing WebSocket
2014-12-03 08:15:14,319:DEBUG:handler:Validating WebSocket request
2014-12-03 08:15:14,319:DEBUG:__init__:Getting accessor: disk/logical/C:|/used_percent/
2014-12-03 08:15:14,319:INFO:handler:NagiosIP - - [2014-12-03 08:15:14] "GET /api/disk/logical/C:|/used_percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 327 0.000000
2014-12-03 08:15:14,756:DEBUG:handler:Initializing WebSocket
2014-12-03 08:15:14,756:DEBUG:handler:Validating WebSocket request
2014-12-03 08:15:14,756:DEBUG:__init__:Getting accessor: memory/swap/percent/
2014-12-03 08:15:14,756:INFO:handler:NagiosIP - - [2014-12-03 08:15:14] "GET /api/memory/swap/percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 317 0.000000
2014-12-03 08:15:20,357:DEBUG:handler:Initializing WebSocket
2014-12-03 08:15:20,357:DEBUG:handler:Validating WebSocket request
2014-12-03 08:15:20,357:DEBUG:__init__:Getting accessor: memory/virtual/percent/
2014-12-03 08:15:20,357:INFO:handler:NagiosIP - - [2014-12-03 08:15:20] "GET /api/memory/virtual/percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 317 0.000000
2014-12-03 08:15:44,898:DEBUG:handler:Initializing WebSocket
2014-12-03 08:15:44,898:DEBUG:handler:Validating WebSocket request
2014-12-03 08:15:44,914:DEBUG:__init__:Getting accessor: cpu/percent/
2014-12-03 08:15:45,927:INFO:handler:NagiosIP - - [2014-12-03 08:15:45] "GET /api/cpu/percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 315 1.030000
2014-12-03 08:20:13,782:DEBUG:handler:Initializing WebSocket
2014-12-03 08:20:13,782:DEBUG:handler:Validating WebSocket request
2014-12-03 08:20:13,782:DEBUG:__init__:Getting accessor: disk/logical/D:|/used_percent/
2014-12-03 08:20:13,782:INFO:handler:NagiosIP - - [2014-12-03 08:20:13] "GET /api/disk/logical/D:|/used_percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 325 0.000000
2014-12-03 08:20:14,641:DEBUG:handler:Initializing WebSocket
2014-12-03 08:20:14,641:DEBUG:handler:Validating WebSocket request
2014-12-03 08:20:14,641:DEBUG:__init__:Getting accessor: disk/logical/C:|/used_percent/
2014-12-03 08:20:14,641:INFO:handler:NagiosIP - - [2014-12-03 08:20:14] "GET /api/disk/logical/C:|/used_percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 327 0.000000
2014-12-03 08:20:14,984:DEBUG:handler:Initializing WebSocket
2014-12-03 08:20:14,984:DEBUG:handler:Validating WebSocket request
2014-12-03 08:20:14,984:DEBUG:__init__:Getting accessor: memory/swap/percent/
2014-12-03 08:20:14,984:INFO:handler:NagiosIP - - [2014-12-03 08:20:14] "GET /api/memory/swap/percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 317 0.000000
2014-12-03 08:20:20,553:DEBUG:handler:Initializing WebSocket
2014-12-03 08:20:20,553:DEBUG:handler:Validating WebSocket request
2014-12-03 08:20:20,553:DEBUG:__init__:Getting accessor: memory/virtual/percent/
2014-12-03 08:20:20,553:INFO:handler:NagiosIP - - [2014-12-03 08:20:20] "GET /api/memory/virtual/percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 317 0.000000
2014-12-03 08:20:44,891:DEBUG:handler:Initializing WebSocket
2014-12-03 08:20:44,891:DEBUG:handler:Validating WebSocket request
2014-12-03 08:20:44,891:DEBUG:__init__:Getting accessor: cpu/percent/
2014-12-03 08:20:45,905:INFO:handler:NagiosIP - - [2014-12-03 08:20:45] "GET /api/cpu/percent/?token=token&warning=85&critical=95&check=1 HTTP/1.0" 200 315 1.014000