[mrtg] SNMP WaLK question

Christian Ludwig cludwig at net.t-labs.tu-berlin.de
Wed Apr 28 22:53:44 CEST 2010


Hello,

I am pretty new to MRTG. Is there a way to sum up all counters of a
given kind? I want to do the following:

# snmpwalk -v2c -c community hostname diskIONReadX
UCD-DISKIO-MIB::diskIONReadX.1 = Counter64: 528397312
UCD-DISKIO-MIB::diskIONReadX.2 = Counter64: 147456
UCD-DISKIO-MIB::diskIONReadX.3 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.4 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.5 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.6 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.7 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.8 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.9 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.10 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.11 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.12 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.13 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.14 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.15 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.16 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.17 = Counter64: 0
UCD-DISKIO-MIB::diskIONReadX.18 = Counter64: 0

I want to sum up all these counters into one. As far as I understand,
this is done with the WaLK feature, so I configured:

LoadMIBs: /usr/share/snmp/mibs/UCD-DISKIO-MIB.txt
Target[hostname.diskIONReadX]:
WaLKdiskIONReadX&WaLKdiskIONReadX:community at hostname
MaxBytes[hostname.diskIONReadX]: 1000000000000000
Title[hostname.diskIONReadX]: Disk I/O reads
PageTop[hostname.diskIONReadX]: <H1>Disk I/O reads</H1>
Unscaled[hostname.diskIONReadX]: ymwd
ShortLegend[hostname.diskIONReadX]: Disk I/O reads
YLegend[hostname.diskIONReadX]: Disk I/O reads
LegendI[hostname.diskIONReadX]: Disk I/O reads
LegendO[hostname.diskIONReadX]: Disk I/O reads
Options[hostname.diskIONReadX]: growright,nopercent

Unfortunatey this does not seem to work. I get the following error:

# mrtg
cannot encode Object ID 15.1.1.12: first subid too big in Object ID
15.1.1.12 at /usr/bin/mrtg line 2049
Use of uninitialized value in split at /usr/bin/mrtg line 2049.
cannot encode Object ID 15.1.1.12: first subid too big in Object ID
15.1.1.12 at /usr/bin/mrtg line 2049
Use of uninitialized value in split at /usr/bin/mrtg line 2049.
2010-04-28 20:48:11: WARNING: Expected a number but got '2 days,
0:06:24'
2010-04-28 20:48:11: WARNING: Expected a number but got 'hostname'
2010-04-28 20:48:11: ERROR: Target[localhost.diskionreadx][_IN_] '
$target->[3]{$mode} ' did not eval into defined data
2010-04-28 20:48:11: ERROR: Target[localhost.diskionreadx][_OUT_] '
$target->[3]{$mode} ' did not eval into defined data

I am running mrtg-2.14.7-2ubuntu3 on Hardy.

I hope somebody can help. Thanks in advance.


 - Christian



More information about the mrtg mailing list