[rrd-users] ESX 3.5 CPU Usage
Steve Shipway
s.shipway at auckland.ac.nz
Mon Aug 4 01:32:36 CEST 2008
> Does anyone have a cunning plan for gathering CPU stats for an ESX box.
> It seems that if you poll the usual Linux OIDs you are actually polling
> the service console, what I need are stats for the VM Kernel, i.e. the
> bit that is serving the VMs. It seems you can get the CPU time for each
> VM so with some cunning RPN I suspect you could add all those up a
> divide by various values to get the percent CPU used but I was wondering
> if anyone has another way of doing it. Ideally I don't want to use the
> APIs as it seems like unneccessary work as really it should be straight
> forward.
I have a small executable (compiled for linux and windows) that can run on the guest itself using NRPE, and be remotely queried by mrtg-nrpe, that spits out guest CPU usage correctly (since a VMWare guest cannot be trusted to report its own CPU usage correctly due to clock skew). It also can do memory usage correctly. It requires a fairly recent VMWare Tools API to work - email me directly if you want a copy. It is also bundled into the latest check_esx (see later)
Also there are the check_esx2 and check_esx3 scripts available on NagiosExchange.org which also have an MRTG mode and can be used as MRTG plugins as well as Nagios.
However...
ESX3.5 has broken the check_esx scripts somewhat. GroundWork Open Source have picked them up (Ive not had time) and done much work on them to make them more portable, although they lost the MRTG mode in the process :(
Depending on your requirements and version of ESX you may be able to use all or some of these methods.
Link to NagiosExchange:
http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F1607.html;d=1
If anyone is interested, email me and I'll give you load of reasons why monitoring VMWare guests is a pain in the rear end. The only way to reliably get the stats is via their VirtualCentre monitoring but I can't access those data.
Steve
More information about the rrd-users
mailing list