[mrtg] Strange error when using UCD-DISKIO-MIB

Freddie Cash fjwcash at gmail.com
Wed Feb 18 23:47:19 CET 2009

I'm trying to monitor the disk I/O for a couple of servers, using MRTG.  
However, no matter what I try, it will not update the RRD file, and gives 
strange "unknown SNMP var" errors.

However, using the exact same config file, but with snpo debugging enabled, 
the SNMP get works, but again without updating the RRD file.

The config file I use for testing is below.

If I run mrtg normally, I get errors like:
Unknown SNMP var diskIONRead.3
 at /usr/bin/mrtg line 2207
Unknown SNMP var diskIONWritten.3
 at /usr/bin/mrtg line 2207
2009-02-18 14:22:09: ERROR: Target[server_readio][_IN_] ' $target->[903]
{$mode} ' did not eval into defined data
2009-02-18 14:22:09: ERROR: Target[server_readio][_OUT_] ' $target->[903]
{$mode} ' did not eval into defined data

If I run mrtg with snpo debugging enabled, I get the following:
--snpo: run snmpget from diskIONRead&diskIONWritten:netmon at server
--snpo: simple If: .3
--snpo: simple If: .3
--snpo: SNMPGet from netmon at server:::::2 -- diskIONRead.3,diskIONWritten.3
--snpo: SNMPfound -- '1907497384', '3106382848'

I've tried using the OID numbers directly (, 
WaLK, and WaLK2, all with the same results.  Running without debug gives 
errors; running with debug gives results -- but the .rrd file is never 
updated, and routers2.cgi always shows NAN.

Using snmpwalk/snmpget via the CLI works as well.

Any ideas on what I'm doing wrong?  Anyone using UCD-DISKIO-MIB 

The monitoring host is running Debian Etch, and the monitored (remote) host 
is running FreeBSD 7.1 using bsnmpd.  I've also tested with Debian Etch 
remote hosts running net-snmpd.

### Global Config Options
HtmlDir: /var/www/mrtg/
ImageDir: /var/www/mrtg/images/
LogDir: /var/log/mrtg/

### Global Defaults
Options[_]: growright bits
WithPeak[_]: my
EnableIPv6: no
Forks: 30
Refresh: 300
Interval: 2
EnableSnmpV3: yes
ShortLegend[_]: b

# MIBs to load
LoadMIBs: /usr/share/snmp/mibs/UCD-DISKIO-MIB.txt

# Switch to using RRDtool for storing data and generating the graphs
LogFormat: rrdtool

### Disk I/O ###
# Read
Target[server_readio]:        diskIONRead&diskIONWritten:netmon at server:::::2
SetEnv[server_readio]:        MRTG_INT_DESCR="Disk I/O (da0)"
Title[server_readio]:         Disk I/O (da0)
MaxBytes[server_readio]:      4294967296
YLegend[server_readio]:       Bytes per second
Legend1[server_readio]:       Bps Read
Legend2[server_readio]:       Bps Write
LegendI[server_readio]:       Read
LegendO[server_readio]:       Write
Options[server_readio]:       nopercent
routers.cgi*Options[server_readio]: nomax

fjwcash at gmail.com

More information about the mrtg mailing list