MRTG Monitoring of Disk

snmp

I am trying to monitor Disk usage over SNMP using MRTG on CentOS5.2. I'm open to any suggestions as to the best way to achieve this (I would also like to do other metrics like CPU). Please don't assume I know anything about MRTG.

I am using the following config:

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt
workdir: /var/www/html/mrtg/temp/
#
# Disk Usage Monitoring
#

Target[servername.]: dskPercent.0&dskPercent.0:OpenNm3@192.168.1.2
Title[servername.]: / on servername
routers.cgi*Desc[servername.]: / on servername
routers.cgi*ShortDesc[servername.]: /
MaxBytes[servername.]: 100
AbsMax[servername.]: 100
Options[servername.]: growright,nopercent,gauge
YLegend[servername.]: used disk space
ShortLegend[servername.]: % used
Legend1[servername.]: usage
Legend2[servername.]: usage
Legend3[servername.]: peak usage
Legend4[servername.]: peak usage
LegendI[servername.]: usage
LegendO[servername.]: usage
routers.cgi*Icon[servername.]: disk-sm.gif
routers.cgi*Options[servername.]: noo,nomax,noabsmax
Unscaled[servername.]: dwmy

I receive the errors:

Unknown SNMP var dskPercent.0
 at /usr/bin/mrtg line 2035
Unknown SNMP var dskPercent.0
 at /usr/bin/mrtg line 2035

From forum surfing etc the suggestion is to use the fully qualified OIDs, I'd like to avoid this (for readability). So essentially I'm wondering where can I find a mib file compatible with mrtg for it's reference or a working config file.

Best Answer

If you are not wedded to MRTG, I'd suggest Cacti as a superior SNMP-based monitoring tool. Cacti understands the MIBs ahead of time and you should be able to just select the partitions you want to monitor.

Cacti can be installed via Yum from the RPMforge repository.

Related Topic