[rrd-users] Re: Filling in missing data

Matchan, Neil W Neil.W.Matchan at team.telstra.com
Thu May 15 01:44:19 MEST 2003


Tony,
I had a simular problem with rrd graphs when I first started using them.

I tracked the problem back to MRTG not polling all devices defined in its
cfg file due to a 'host unreachable' network response for one device.

MRTG seems to continually retry the 'unreachable' host at the exclusion
of all other devices defined in the .cfg file. When the failing host becomes
'reachable' again, MRTG continues on its merry way.

The end result is that you end up with 'NaN' values in the .rrd for the missing
time samples. I posted a query about this to the MRTG newsgroup but never got a
reply.

I've minimised this effect by doing the following:

1/ Splitting my .cfg file into several .cfg files.
   Test hosts in one .cfg file,
   Development host in one .cfg file,
   Production hosts in individual .cfg files,
   Network routers in one .cfg file,
   Network switches in several .cfg files.
   (I run MRTG in daemon mode as each .cfg file has its own instance. I think that the correct term?)

This limits the impact of the 'host unreachable' problem to only those devices in the same .cfg
file as the problem host/device (MRTG instance).

2/ RRDTool CDEF statement allow you to test for the 'NaN' value and replace it. This stops
   the holes in the RRDTool graphs which are really caused by CDEF calculation errors. That is,
   you can't add,substract,multiply,etc a numeric value with a non-numeric value (as I understand it).

   The example below is straight out of the rrdtool RRDGRAPH manual. It sets the value of variables
   'idat1' and 'idat2' to '0', 'IF' their current value is 'NaN', then add's the two values an multiplies
   the result by 8.

   eg. DEF:idat1=interface1.rrd:ds0:AVERAGE \
       DEF:idat2=interface2.rrd:ds0:AVERAGE \
       CDEF:agginput=idat,UN,0,idat1,IF,idat2,UN,0,idat2,IF,+,8,*

There is a way of replacing 'NaN' with the last known value but it hides the hole in the rrd data. I don't
do this as it could hide a real network outage. I'm not certain but I think using 'LAST' instead of '0' may do it.
       CDEF:inputdata=idat,UN,LAST,idat1,IF,idat2,UN,LAST,idat2,IF,+,8,*

Perhaps someone else could comfirm this.

I hope this is of some help to you, 

Neil M


 

-----Original Message-----
From: Tony [mailto:rrdtool at cerbernet.co.uk]
Sent: Thursday, 15 May 2003 7:34 AM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Filling in missing data


I'm using RRD to log octets from a number of interfaces on a number of
routers.
For some reason which I have not found out yet, I'm getting blank bits
in my graphs where there is no data in the database 2 or 3 five minute
periods.

Until I find out why this is happening is there a way to get the rrdtool
graph command to fill in these gaps with the same value as the previous
value in the database?

Thanks in advance.
Tony

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list