[rrd-users] faking a datasource on the fly
d.sluijters at betterbe.com
Wed Jul 27 14:18:51 CEST 2011
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 126.96.36.199.4.1.2021.4.13.0 (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 .188.8.131.52.4.1.2021.4.11.0 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 .184.108.40.206.4.1.2021.4.11.0 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.
e: d.sluijters at betterbe.com
More information about the rrd-users