[rrd-users] faking a datasource on the fly

Daniele Sluijters d.sluijters at betterbe.com
Wed Jul 27 14:18:51 CEST 2011

Hello guys,

This one might sound familiar to some. MRTG has the (nasty) limitation that it needs to fetch pairs of data, it can't just fetch 1 or 3 values, they must always be grouped in logical pairs.

This presented a problem when (ucdavis.memory.memShared) had to be fetched because that value isn't populated anymore. Instead however of returning 0 (which would be inaccurate) or Unknown (accurate) "Snmp no such object" is returned. This apparently confuses MRTG so much that even if the other OID which makes up the pair . does respond with sane values an RRD is created with two datasource's which just always return NaN.

Since this is completely useless I decided to fetch . twice, as to make a pair so MRTG can handle it. Now, that works but of course I'm now graphing two identical values which is both stupid and incorrect.

I was wondering if anyone had a quick and simple way of rewriting ds0 on the fly (RPN expression) as to, regardless of what the RRD says, always return Unknown. That would allow me to create a sensible graph which corresponds to reality. Any other solution one can come up with is welcome too which preferably doesn't involve altering the rrd-file itself.

Daniele Sluijters
e: d.sluijters at betterbe.com
w: http://www.betterbe.com

More information about the rrd-users mailing list