[rrd-users] Re: newbie question
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Fri Nov 17 10:59:54 MET 2000
Dave Bodenstab wrote:
What you write here is not what you're trying to do at first. You write:
> I've got a record of each call I make to my ISP, so I figured it would be
> a good way to try rrdtool by trying to count the number of telephone calls
> per day for a month and graph the result. I came up with the following.
This means: *you* are counting the number of telephone calls. However,
what you are trying to accomplish is *RRDtool* should count. This doesn't
work as you already noticed. This is not an error.
> For testing, I'm using both the GAUGE and ABSOLUTE data sources just to
> see what happens... what I want is something that will simply accumulate
> a count of the number of calls. I thought that the GAUGE would be
> appropriate since each update would be a single instance of a phone call.
If you would also feed to RRDtool when a call finishes (with number 0) and
use a suitable heart beat, xff factor etcetera, you would get a database
that shows when a phonecall was made. If you use the settings as you did,
this would be a percentage of the day.
It is important to understand that RRDtool doesn't work with values stored
in a database. The values are used to set a complete time range. Example:
if you update the database at time (t) and again on time (t+300) using a
COUNTER, you know the rate from (t) to (t+300), not only at (t) and (t+300).
In other words, you set an interval, not a point.
> I also thought that perhaps ABSOLUTE might be required so that the count
> accumulates.
ABSOLUTE: the *rate* stored in the database is the fetched value divided
by the amount of time lapsed. If the value is 100 and the amount of time
is 10 seconds, the rate is 10. If the next value is 200 and the amount of
time lapsed is 10 seconds again, the rate is 20.
COUNTER: the *rate* stored in the database is the fetched value *minus*
the *previous* value divided by the amount of time lapsed. If the value
is 100 and the amount of time is 10 seconds, the rate is 10. If the next
value is 200 and the amount of time lapsed is 10 seconds again, the rate
is 10 (an increase of 200-100=100, during 10 seconds).
GAUGE: the *value* stored in the database is the fetched value, there is
no time dependency.
>
> rrdtool create T -b '11/1/00' -s 1 \
> DS:gauge:GAUGE:86400:U:U \
> DS:absolute:ABSOLUTE:86400:U:U \
> RRA:MAX:0.99999:86400:31 \
> RRA:LAST:0.99999:86400:31
You define a step time of 1 second. This means that you get a precision
of one second. Each primary datapoint is describing an interval of one
second. Next, you use 86400 for the number of steps per consolidated
data point. The RRA (which is used for graphing) will describe intervals
of one day. (Remember: from midnight UTC to the next midnight UTC!!!)
> [some updates]
[...]
>
> This doesn't work. The GAUGE has values of 1 and the ABSOLUTE has
> some very small values. I reasoned that I needed to provide the
It does work as implemented.
You're close, keep trying!
regards,
Alex
--
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