[rrd-users] Difficulty getting rrdtool to store "daily" information
Alex van den Bogaerdt
alex at ergens.op.het.net
Fri Feb 16 20:01:43 CET 2007
On Fri, Feb 16, 2007 at 01:34:29PM -0500, Bill Moran wrote:
> However, the data isn't going in to rrdtool the way I expect, which means
> there's something I don't understand.
> The theory is that this will give me discreet values for each "day" (where
> day is a period between noon and noon of the following day)
Times are UTC and are a whole multiple of the step size.
Unless you are living in a time zone 12 hours from Greenwich,
"day" is most definately not noon to noon.
Current time difference between Atlanta and UTC is 5 hours. This
will be different once daylight saving starts.
Midnight UTC is 19:00 your current local time.
> Then I can get max values to graph monthly and yearly so we have history.
> I seem to be hitting a problem getting the values _in_ to the rrd. Take
> this chunk of sample data:
> rrdtool update /var/www/bacula/jobs.rrd 1171083600:68440880988
1171083600 is not a whole multiple of 86400. See my site and
look for normalization.
> rrdtool update /var/www/bacula/jobs.rrd 1171170000:384966685
> rrdtool update /var/www/bacula/jobs.rrd 1171256400:7604606807
> rrdtool update /var/www/bacula/jobs.rrd 1171342800:5511113163
> rrdtool update /var/www/bacula/jobs.rrd 1171429200:7160839755
> Now those e+04, e+03 values are way lower than what I put in. I'm guessing that
> somewhere rrdtool is still averaging that data over some period or something,
> but I'm at a loss as to what I can do to get it in there the way I want it.
> I thought the MAX declarations would take care of it, but I must still be
> missing something.
You're guessing too much. Also, I think you need a graphing program,
not RRDtool. RRDtool is about rates, bytes per second, not backed up
data per run.
Suggestions to think about (not necessarily to implement!):
* update hourly, not every 24 hours
* combine start time of backup, end time of backup, amount of
data backed up into two updates. Using the ABSOLUTE counter type
and a suitable high heartbeat:
- at the start time of the backup, update with 0
- at the end time of the backup, update amount of bytes
The result is amount of bytes_per_second. If you use GAUGE
instead of ABSOLUTE, then you would fool RRDtool in thinking
that 7604606807 bytes per second were backed up. It will
display this number, unless further data manipulation is needed
(think normalization and consolidation). Eventually you will
find out that you have fooled yourself, not RRDtool.
* Don't bother using correct times. If you're only interested in
per-day values over a long period of time, then who cares about
the few hours difference? Just update at midnight UTC. You
still need to think about the difference between a rate and a
value. Car analogy: you want 480mi, but you get 60mph during 8 hours.
* Don't use RRDtool, use a drawing program, or openoffice calc, or ...
Alex van den Bogaerdt
More information about the rrd-users