[rrd-users] Re: Using rrd for traffic counting.
BAARDA, Don
don.baarda at baesystems.com
Fri Jul 28 04:46:12 MEST 2000
G'day Tobias,
> -----Original Message-----
> From: Tobias Oetiker [SMTP:oetiker at ee.ethz.ch]
> Sent: Friday, July 28, 2000 10:56 AM
> To: BAARDA, Don
> Cc: 'rrd-users at list.ee.ethz.ch'
> Subject: [rrd-users] Re: Using rrd for traffic counting.
>
>
> Jul 20 you sent me mail regarding [rrd-users] Using rrd for traffic
> counting.:
[...]
> *> In particular, I'm worried about the affects of data re-sampling and
> *> Unknowns. In our case, I'd want unknowns to be treated as zero when
> *> consolidating data (we don't want to over-bill). We also don't want to
> miss
> *> any traffic we know was there just because we couldn't get one sample.
> *> Because byte counters just count bytes, it should be possible to
> interpolate
> *> the missing sample from the samples before and after. Does rrd do this?
>
> it can do this using the xff parameter in rra setup ....
>
The problem with xff is it is an "average or nothing" threshold for
consolidating. You can either mark the consolidated value as "Unknown", or
calculate an average based on the available samples. This is the same as
either throwing away the known samples because of some unknowns, or assuming
the unknowns we actually at the average of the knowns in that consolidation
period (another possibly better way unknowns could be "estimated" would be
by interpolating between known values on either side, but I don't think RRD
does that).
I think I answered my own question about "can missing samples be
interpolated from the counters" in another post. I don't think xff does what
I was asking, but the "heartbeat" setting can. From how I read the manuals,
it looks like multiple "steps" can be stored for a single long sample
interval, provided that sample interval is less than "heartbeat". This gives
the same average value for the multiple "step" values, but a consolidation
of these steps is exact.
[...]
> *> I'm thinking that I might need to use 'average' as my CF, and then use
> a
> *> fancy front end that massages the SNMP to account for unknowns and
> *> re-sampling to ensure I get what I want. I'd rather not implement
> something
> *> like this if rrd's existing re-sampling and unknown handling can be
> *> convinced to do what I want.
>
> what you do is:
>
> a) decide the resolution you will be working at (for unknown and such)
>
> b) create an RRD with that resolution as --step
>
> c) create an RRA which stores AVERAGE at this resolution for the
> whole month or maybe 2 tobe on the sure side.
>
> d) write a little perl script which uses RRDs::fetch to get the
> data out again
>
> e) drop the unknown samples ( it is your problem if you messes up
> the traffic meetering so you can't ask the ustomers to pay for it)
>
> f) sum the rest of the samples up, multiply by interval time and
> number of samples ... this willget you the octet count for the
> period you are looking at ...
>
I think I know a better way;
rrdtool create traffic.rrd --step 300 DS:in:COUNTER:86400:0:U
RRA:AVERAGE:0.0:1:576 RRA:AVERAGE:0.0:288:357
If I understand it right, this will give us one RRA with 5 minute
averages, and another with daily averages, with one year worth of days. The
data sample has a heartbeat of 1 day. If I update this nominally every 5
minutes, I'll get nice five minute and daily averages. If I miss samples for
up to a day, the 5 minute values will all be set to the average for that
period, but the consolidated daily average will still be exact. Only if I
miss samples for more than a day will the 5 minute and daily averages be
marked as unknown.
[...]
Thanks,
ABO
--
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