CPU WMI check returns negative utilization value

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
txwomansu
Posts: 36
Joined: Mon Oct 10, 2011 9:05 am

CPU WMI check returns negative utilization value

Post by txwomansu »

We check CPU load via WMI.

How is a negative CPU average utilization value possible?

CRITICAL - [Triggered by _AvgCPU<0] - Average CPU Utilisation -3.80% (Over approx 5 sec period)

Thanks!
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: CPU WMI check returns negative utilization value

Post by mguthrie »

There could either be a logical bug in the plugin, or maybe it could be an issue with the server times being out of sync from each other(?). You can run the following on the Xi server to update the system time.

Code: Select all

yum install ntp
ntpdate pool.ntp.org
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CPU WMI check returns negative utilization value

Post by scottwilkerson »

Actually, looking at the plugin developers Change Log it looks like this was fixed in Version 1.44 - 16th June 2011
Sometimes calculated fields based on WMI Raw data which use the WMI field Timestamp_Sys100NS return negative values. This affects checks which were calculated by differencing 2 WMI queries over a period of time eg checkcpu. This is most likely caused by inaccurate timing information provided by the hardware. This most likely only affects virtual machines, probably more on busy host platforms, due to their known inability to return accurate clock information. To counter this, we now check all calculated values and if they are below zero, we make them zero. This is really only a work-around. All calculations like this on VMs will be inaccurate by single digit percentages, especially when checked over short timeframes. We recommended using values for -y and -t as high as you can to improve accuracy. Thanks to Lee Kennedy for notifying us of this problem.
If you update the plugin to any version newer than ( 1.44 ) this should fix this problem
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked