[rrd-users] Re: Add output from different interfaces into one DS

mrugan mrugan at softhome.net
Tue Jan 13 18:27:05 MET 2004


Hello Simone,

SFAS> Hello to all!
SFAS> I'm new on the list and in RRD-Tool too...
SFAS> Also I've a little question :)
SFAS> I need to create a Graph with the sum of different interfaces (100Mbit/s
SFAS> every int).
SFAS> The values are taken via SNMP on a Cisco Device. (ifInOctets/ifOutOctets -
SFAS> COUNTER32)
SFAS> I need to sum all incoming traffic from these different interfaces into one
SFAS> DS.
SFAS> The same for the outgoing traffic.
SFAS> This to create a graph with the total traffic of more than 150 interfaces on
SFAS> a DSL Router .
SFAS> My problem isn't take the informations via SNMP (while - snmpget) but HOW to
SFAS> store it with RRD-Tool.
SFAS> I've created the RRD file as follow:
SFAS> rrdtool create file.rrd --start `date +"%s"` DS:total_in:COUNTER:600:0:0
SFAS> DS:total_out:COUNTER:600:0:0 --step 300 [...]
SFAS> Now, if I store all incoming traffic via SNMP, sum all into a variable and
SFAS> store it into rrd file it's wrong because the variable is a COUNTER 32bit
SFAS> and the sum is over 4294967295 (right?).
SFAS> Also how can I collect and store all the traffic from these interfaces to
SFAS> have a right graph and RRA?
SFAS> Thank's!
SFAS> Simon
SFAS> --
SFAS> Unsubscribe
SFAS> mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
SFAS> Help       
SFAS> mailto:rrd-users-request at list.ee.ethz.ch?subject=help
SFAS> Archive     http://www.ee.ethz.ch/~slist/rrd-users
SFAS> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

this is my first attempt to write a "how-to like reply"; so if i am
wrong in some parts, please advise;

http://martybugs.net/linux/rrdtool/traffic.cgi

consider reading one more time (why ... u'll figure it out) the part
which explains the usage of a DERIVE DataSource instead of a COUNTER
against the rrdtool manual. [helps a lot creating both DERIVE/COUNTER
to see the graphic result ... which is amazing ... large spikes
against the 0(zero)]

... while creating the RRAs i've find a way of asking me, myself and i
that would be very helpfull...
here is the algorithm:
Q1. how often i am going to collect [A: 5 minutes=300seconds]
Q2. amount of data that can be Unknown (%) = 50% => xff=0.5 [often used]
Q3.
i would like to store data over a day: 1 day = 24h x 3600 seconds;
improper said: what should be the resolution of graphic: every 5
minutes (300 seconds)
=========
every 300 seconds,  1 read is averaged into 1 ConsolidatedDataPoint
(CDP); (24 X 3600)/300 = number of rows to be stored [A:  288]
........
month:
resolution would be at 1 h; data gathered over 1 hour -> averaged ->
1CDP; 1 hour=3600 seconds; how many reads: 3600/300 = 12;
[12 PDP->1CDP]; one month=31 days; = 31x24hours; = 31x24x3600 seconds;
how many times "3600" seconds fit in one day? A: 31x24
so i am going to store 744 rows of CDP;

RRA:AVERAGE:0.5:1:288
RRA:AVERAGE:0.5:12:744
also store MAX, MIN, RRAs over a period.

raptor <raptor at tvskat.net> : [rrd-users] setting correct RRA step,rows
is a nice post that u should consider if u want to be accurate.

summing all up;
1. every interface has 2 DS: interface_in; interface_out; setting up
150 x 2 DS in one rrd database ... i would not do it ...  if u r wrong
at some point ... lots of data collected are to be lost; few of us got
the perl-xml-guru thing / while rrdtool fetch information | perl thing to set back
some values in a new database; setting up 150 files(rrd) has some
work-around: can be automated via perl;
2. CDEF your data:
A. bits to bytes;
CDEF:bytes=bits,10,*
B. negative data to compare in-out;
out should be on the negative side; so multiply with -1 to get the
negative number to be plotted:
CDEF:negative=out,-1,*

that's about it.










--
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