[rrd-users] Re: zeroing undef values

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Sep 22 16:51:42 MEST 2001

Patrick Rother wrote:

> Ok, my problem description was a bit inexact.
> At the time of this decision there is are already collected data in the rrd
> which must not get lost.

Right.  This makes my solution inappropriate.

> I need this for sum kind of summing up over severaly rrd files.
> It's even no solution to set the values to 0 while graphing because I
> already distinguish zero and undef value there, and a definitly want zero
> values in the rrd.

It is possible to change unknowns into zero only for a specific time
range.  However, this means that you need to alter your scripts and
you may not want to do that.  If you want to give it a try anyway:

Suppose you'd like to change unknowns encountered before januari 1st 2001.
TIME,978303600,LT  results in a true value if the time from the value
is before that date.  If you know for sure the RRD was created at that
date, you can just change any value (always unknown) into 0:

   DEF:old=   (etcetera)

This will result in 0 if the entry was before time 978303600 and it will
return the real value from the DEF if not. All other unknown data will
remain in the result as it is not touched.

If you know you will encounter this problem in the future, you may
want to fill your databases with zeros at create time.  This can be
done as I described.
1) create a database that ends well before "now".  The difference in
   time should be at least the amount of time that is stored in the
   largest RRA 
2) The DSes should be GAUGE.  The heartbeat should be large enough to
   accomodate for a huge update
3) update the database with value 0 and time "now"
4) use "rrdtool tune" to set the correct DS type and heartbeat

The update will fill the entire RRD with zero, resulting in a database
that has a known history, not an unknown history.  The end time is 'now'
just as for a normally created rrd file.

 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
| Technical questions sent directly to me will be nuked. Use the list. | 
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |

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