[mrtg] No data in RRD file, but MRTG runs fine

Christian Ludwig cludwig at net.t-labs.tu-berlin.de
Fri May 7 16:14:42 CEST 2010


Hello,

I have a strange behavior using MRTG as RRD collector. I have a probe
running, which gets the read I/O bytes for all disks in the system via a
custom SNMP script. The OID is diskIONReadX (Counter64). The config
section looks like the following:

--- BEGIN CONFIG ---
Target[localhost.diskIONReadX]: ` snmp_sum -c public -h localhost -o diskIONReadX `
Directory[localhost.diskIONReadX]: localhost
MaxBytes[localhost.diskIONReadX]: 1000
Title[localhost.diskIONReadX]: Disk I/O reads
PageTop[localhost.diskIONReadX]: <H1>Disk I/O reads</H1>
Unscaled[localhost.diskIONReadX]: ymwd
ShortLegend[localhost.diskIONReadX]: B/s
YLegend[localhost.diskIONReadX]: Disk I/O reads
LegendI[localhost.diskIONReadX]: Disk I/O reads
LegendO[localhost.diskIONReadX]: Disk I/O reads
Options[localhost.diskIONReadX]: growright,nopercent
--- END CONFIG ---

The debug output of MRTG looks like:

--snpo: run external  snmp_sum -c public -h localhost -o diskIONReadX 
--snpo: External result:1060881408 out:1060881408 uptime:localhost name:diskIONReadX for localhost
--log: RRDs::tune(/var/www/mrtg/localhost/localhost.diskionreadx.rrd -a ds0:1000 -a ds1:1000 -d ds0:COUNTER -d ds1:COUNTER)
--log: RRDs::update(/var/www/mrtg/localhost/localhost.diskionreadx.rrd, '1273074602:1060881408:1060881408')
--log:  got: 0.682666666666667/0.682666666666667

Now I have set up the same for diskIONWrittenX.
--- BEGIN CONFIG ---
Target[localhost.diskIONWrittenX]: ` snmp_sum -c public -h localhost -o diskIONWrittenX `
Directory[localhost.diskIONWrittenX]: localhost
MaxBytes[localhost.diskIONWrittenX]: 1000
Title[localhost.diskIONWrittenX]: Disk I/O writes
PageTop[localhost.diskIONWrittenX]: <H1>Disk I/O writes</H1>
Unscaled[localhost.diskIONWrittenX]: ymwd
ShortLegend[localhost.diskIONWrittenX]: B/s
YLegend[localhost.diskIONWrittenX]: Disk I/O writes
LegendI[localhost.diskIONWrittenX]: Disk I/O writes
LegendO[localhost.diskIONWrittenX]: Disk I/O writes
Options[localhost.diskIONWrittenX]: growright,nopercent
--- END CONFIG ---

After that the log says:

--snpo: run external  snmp_sum -c public -h localhost -o diskIONWrittenX 
--snpo: External result:6687612928 out:6687612928 uptime:localhost name:diskIONWrittenX for localhost
--log: RRDs::tune(/var/www/mrtg/localhost/localhost.diskionwrittenx.rrd -a ds0:1000 -a ds1:1000 -d ds0:COUNTER -d ds1:COUNTER)
--log: RRDs::update(/var/www/mrtg/localhost/localhost.diskionwrittenx.rrd, '1273074602:6687612928:6687612928')
--log:  got: ???/???

This looks odd to me. MRTG writes the data into the RRD file, but does
not seem to get them really in there. It's not a file permissions
problem (MRTG runs as root here anyway):

# ls -l /var/www/mrtg/localhost/localhost.diskionwrittenx.rrd    
-rw-r--r-- 1 root root 105312 May  7 14:10 /var/www/mrtg/localhost/localhost.diskionwrittenx.rrd

I already deleted that file to no avail. Same behavior, after MRTG
recreated it. Looking into the RRD file it only gives "nan"s for MAX and
AVERAGE.

What could be the problem here?


  - Christian 

-- 
VI VI VI The editor of the beast.



More information about the mrtg mailing list