CPU usage WMI vs NCPA 1.8.1 windows multi cores

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

CPU usage WMI vs NCPA 1.8.1 windows multi cores

Post by mon-team »

I have windows server 2008 R2 with 24 cpus
I check the values on the CPU is NOT equal between WMI and NCPA 1.8.1

NCPA:
OK: Percent was 25.00% (0%, 0%, 0%, 0%, 0%, 0%, 0%, 100%, 0%, 100%, 0%, 100%, 100%, 0%, 100 %, 0%, 100%, 0%, 0%, 0%, 0%, 0%, 0%, 0%)

WMI:
OK (SAMPLE PERIOD 299 sec) - Average CPU Utilisation 3.92%

On windows server 2008 R2 reflected a value much the same as that given by WMI.
Please see image.

Is there some setting or a fix?
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CPU usage WMI vs NCPA 1.8.1 windows multi cores

Post by lmiltchev »

I check the values on the CPU is NOT equal between WMI and NCPA 1.8.1
Are you running your cpu check at the same time you are watching the Resource Monitor on the Windows server?

The CPU usage will constantly fluctuate - it is almost impossible to get the same readings as you can't run the check at the exact same time...

Perhaps, it's better if you started monitoring the cpu usage over time (i.e. via the windows performance counters), and compared the graphs (with the NCPA CPU check) over the same time period.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: CPU usage WMI vs NCPA 1.8.1 windows multi cores

Post by mon-team »

I followed the check from the command line on two shells simultaneously:

NCPA:
OK: Percent was 45.83% (100%,0%,0%,0%,100%,100%,100%,0%,100%,100%,0%,100%,100%,0%,0%,0%,100%,0%,0%,100%,0%,0%,100%,0% )|'used_percent'=45.83%;80;90


WMI:
OK (Sample Period 2405 sec) - Average CPU Utilisation 8.46%|'Avg CPU Utilisation'=8.46%;80;90;


The result is very different between wmi and resources of windows. Any ideas?
I attached the performance graph of two check
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CPU usage WMI vs NCPA 1.8.1 windows multi cores

Post by lmiltchev »

Can you show us the actual "NCPA CPU usage" command run from the command line, along with the output of it? Also, run:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V


and show the output.

Note: I tested this check against Windows 7 and it worked fine but I haven't tried it on Windows server 2008 R2. It is possible that there is a bug but I am not able to confirm it at this time.
example01.PNG

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V
check_ncpa.py, Version 0.3.5
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.x.x -t 'mytoken' -P 5693 -M cpu/percent -q aggregate=avg -w 80 -c 90
OK: percent was 15% | 'percent_0'=15%;80;90;
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked