[mrtg] Graphs of load average via SNMP ?
Gavin Hamill
gdh at acentral.co.uk
Tue Jul 22 10:47:30 MEST 2003
Hullo :)
I've been reading, googling and experimenting with this for a couple of days
now, with no success, so I'm turning to you nice people for help :)
The 'ssCpuRaw' sample at http://net-snmp.sourceforge.net/tutorial/mrtg/ works
fine, but I'm really after the general load average, rather than a snapshot
of how busy the CPU was at that moment.
I've been using mrtg.conf snippets like this so far:
Target[loadavg]: laLoad.1&laLoad.3:public at localhost
MaxBytes[loadavg]: 2000
Title[loadavg]: pod - load average
YLegend[loadavg]: loadavgProc. x 1000
ShortLegend[loadavg]:
Legend1[loadavg]: Load average 1 min
Legend2[loadavg]: Load average 15 min
LegendI[loadavg]:
LegendO[loadavg]:
Options[loadavg]: growright,gauge
PageTop[loadavg]: <H1>pod - load average</H1>
But the graph is always zero - I've even tried using the numeric OIDs thusly:
Target[loadavg]:
.1.3.6.1.4.1.2021.10.1.3.1&.1.3.6.1.4.1.2021.10.1.3.3:public at localhost
I'm aware that I could use a local script to parse /proc/loadavg but I want to
deploy this style of monitoring over a cluster of webservers , and ultimately
reconfigure a load-balancer depending on the various sysloads. But back to
the problem ;)
I'm quite able to see the loadavgs using snmpwalk:
pod:/etc# snmpwalk localhost public laLoad
enterprises.ucdavis.laTable.laEntry.laLoad.1 = 0.77
enterprises.ucdavis.laTable.laEntry.laLoad.2 = 0.49
enterprises.ucdavis.laTable.laEntry.laLoad.3 = 0.33
and numerically:
pod:/etc# snmpwalk localhost public .1.3.6.1.4.1.2021.10.1.3
enterprises.ucdavis.laTable.laEntry.laLoad.1 = 0.68
enterprises.ucdavis.laTable.laEntry.laLoad.2 = 0.49
enterprises.ucdavis.laTable.laEntry.laLoad.3 = 0.33
My snmpd.conf is superficial - a single line containing "rocommunity public
localhost." MRTG itself is 2.9.17 from Debian woody.
I've also tried "LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt" at the top
of mrtg.conf - but it made no difference.
I am of course deleting the old /var/www/mrtg/*.log files and waiting 10
minutes in between each test for mrtg to gather new data.
If anyone has some ideas about this, I'd be very grateful to hear them!
Kind regards,
Gavin.
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list