Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mrtg graphing cpu load on windows box

182 views
Skip to first unread message

David Dyer-Bennet

unread,
Apr 7, 2011, 11:10:51 AM4/7/11
to
I've got a nearly-new mrtg installation on a Linux server. It's successfully
picking up and graphing some random things from itself, so I've gotten past
the very first baby steps.

Can't get it to display cpu load from a Windows box, though. I've got
snmp working on that box, and can pull the fields I want to graph from
the windows box via snmpget and tkmib (both running on the same linux box
where mrtg is hosted, so there aren't allowed-host issues).

Many of the things I've tried I get error emails from mrtg (often
actually telling me what I did wrong!). My current config doesn't
produce error emails, but the charts consistently show a value of
zero, whereas the data I pull manually is non-zero.

Right now, to keep things simple while I work out my config problems, I'm
pulling only one CPUs info; it's actually a 4-core box and I intend to
pull all 4 and add them together for one graph. But not until I get the
simple case working!

So, I can pull the data with snmpget:

snmpget -c xxpasswd -v 1 prcwsbbdev .1.3.6.1.2.1.25.3.3.1.2.4
HOST-RESOURCES-MIB::hrProcessorLoad.4 = INTEGER: 3

(That's .iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad.4;
I'm using the OID form because it's shorter, and because I believe it
avoids any possible problems about having MIBs loaded.)

(Both -v 1 and -v 2c work; not sure what mrtg is ending up using.)

Here's that section in mrtg.cfg:

# hrProcessorLoad.4-7
Target[bbdev.cpu]: 1.3.6.1.2.1.25.3.3.1.2.4&1.3.6.1.2.1.25.3.3.1.2.4:xxpasswd@prcwsbbdev
Title[bbdev.cpu]: Bbdev CPU Load
PageTop[bbdev.cpu]: <H1>Bbdev CPU Load</H1>
MaxBytes[bbdev.cpu]: 100
ShortLegend[bbdev.cpu]: %
YLegend[bbdev.cpu]: CPU Utilization
Legend1[bbdev.cpu]: Current CPU percentage load
LegendI[bbdev.cpu]: Used
LegendO[bbdev.cpu]:
Options[bbdev.cpu]: growright,nopercent
Unscaled[bbdev.cpu]: ymwd

(Community name obfuscated on principle, even though the hosts aren't
accessible from outside, and it's read-only anyway.)

No error emails, and the charts update, but the value graphed is
always zero. Not only is the line at the bottom, but the text below
the image shows one line of data like "Used 0.0 % 0.0 % 0.0 %".

The headings show "The statistics were last updated Thursday, 7 April
2011 at 10:00, at which time 'PRCWSBBDEV' had been up for 23:01:25."
The presence of that uptime information means it was able to read
that bit from the target system, right? So a lot of the most blatant
stupidities on my part are off the table? There really is such
a system in our network, I can get packets to it, I have the right
community name?

So, any idea what I'm doing wrong? Or if not, can somebody give me
a chunk of config, the simpler the better (i.e. not doing anything
fancy) that successfully pulls data from a Windows XP box and
graphs it?

I've found the examples at http://wmiex.msft.net/ which appear to show
mrtg graphing data from Windows, including some of the data I want,
but despite the reference to "View the MRTG.CFG file..." on the page,
I haven't been able to find the MRTG.CFG file that gets them those
results.

0 new messages