[rrd-users] Re: YANQ - Yet Another Newbie Question - Once a day gauge
Alex van den Bogaerdt
alex at ergens.op.het.net
Sat Nov 23 01:22:29 MET 2002
On Fri, Nov 22, 2002 at 12:22:41PM -0600, Brander, Eric wrote:
> Scenario: Once a day I want to have a number entered in to an RRD. I want
> to store these numbers for 5 years. 1825 data spots at an interval of 86400
> (1 day) seconds. In case I miss a poll or the polling is late, I've allowed
> a window of an additional day (up to 172800 seconds) to accept data. (I
> think that's how it works) So, I create a database:
> rrdtool create test.rrd --step 86400 DS:Count:GAUGE:172800:U:U
So far so good, however ...
> I don't really want to average anything, I don't want any consolidations, I
> just want it to store my numbers as I have given them. So, I'm really
> confused on the RRA: section. Using the MAN pages and the tutorial I came
> up with what I did, but honestly I do not know why.
RRDtool works with UTC time. Look this up on the internet.
You are telling RRDtool to:
> create test.rrd
> --step 86400
(so: each UTC time is a multiple of 86400 seconds)
and it should define
a DataSource named Count. This is a GAUGE (see the faq). It should
receive updates no further apart than 172800 seconds, it as an
Unknown minimum and an Unknown maximum.
After "resampling" the data (which will ALWAYS take place but maybe
a no-op) RRDtool should store the calculated rate into
a Round Robin Archive. *If* more than one of these values are needed
to calculate the resulting rate for a time slot *then* it shall be
done using the AVERAGE consolidation function. Doing so, 0.5 (50%) of
the input may be unknown yet still provide known output. However,
the RRA only needs "1" computed rate (from the DS) per time slot. The
entire RRA will store 1825 of those "consolidated" rates.
As you now know no averaging takes place because the average of just
one value *is* that value (no-op).
> SO, with that command I have an RRD called test.rrd.
> I've input some data, added a day's worth of seconds between readings.
> Count starts at 0, then 100, 200, 400, 900, 1200 for the subsequent days.
Define "day". I guess you got bitten by the fact that you don't see
the UTC vs. local time zone problem.
> I can generate a nice little basic graph on this data! Yahoo! I use the
> following that I mangled and extracted from the tutorial:
> rrdtool graph test.gif --start 1037836800 --end 1038389574
> DEF:Count=test.rrd:Count:AVERAGE LINE2:Count#555555
> I'm not yet sure why I need to have the word " Count" in there so many
> times, nor do I know why I'm using LINE2 (what happened to LINE1?) -
> regardless, I'll bang the MAN pages some more for those answers.
the image called
> --start 1037836800
> --end 1038389574
(note that this value is not a whole multiple of 86400)
to be fetched from the database called
more precise the variable
in that database from the RRA which is built using the
consolidation function. You don't want the DS called "whatever" and
you also don't want the DS called "Count" but with CF "MAX" (if either
of these two would be available). You select a specific data source
from a specific RRA. The one selection criterium left not mentioned
here is which resolution. This is deducted from "--end" minues "--start"
divided by the amount of entries needed for the image.
Then you tell RRDtool to draw a
(don't think LINE4 will also work. This isn't in the doc)
(this is the variable from "DEF:Count=")
and no legend.
Search the mail list archives for postings of me with the
items "3600" "time zone" (or maybe: "timezone"), "UTC" and perhaps
more of those keywords.
Or just believe me when I say you want to:
- create a new database using "--step 3600"
- use whole multiples of "86400" for *all* times including
The use of GAUGE vs. AVERAGE (and others) is explained in detail on
many sites including the faq site.
One more piece of advice: start simple. Really simple this time.
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users