[rrd-users] Re: Examples / Docs...

Chris Knipe savage at savage.za.org
Sat Aug 10 23:08:36 MEST 2002


Hi Paul,

> One very important piece of information you leave out
> is how fine a resolution you want.  MRTG doesn't do
> 24 hours for anything.  33 hours, 20 minutes is the
> closest.  That is a 5 minute resolution.  Then there's
> a 30 minute resolution for 400 30 minute periods, a
> 2 hour resolution for 400 2 hour periods, and a 1 day
> resolution for 400 days.  See the theme?  You say
> you want 2 years worth of data, but at what resolution?
> 30 seconds, 5 minutes, a half hour, 2 hours, 1 day, 1
> month?  It also depends on how often (at a minimum)
> you plan to update each RRA.

Ok, this is obviously crucial information, and I'm sorry for neglecting to
include this.  As I come from a MRTG background, and that I did made mention
in my first email that various graphs will be based on the MRTG equivalanet,
I thought it would have been safe to assume the used intervals for updating
the RRAs would be 5 minutes.  Now that I think about it though, 5 minutes
isn't even a standard in MRTG, and so I do have to appologise here.

For the creation of the databases, I basically used something like this:
rrdtool create myrouter.rrd         \
            DS:input:COUNTER:600:U:U   \
            DS:output:COUNTER:600:U:U  \
            RRA:AVERAGE:0.5:1:600      \
            RRA:AVERAGE:0.5:6:700      \
            RRA:AVERAGE:0.5:24:775     \
            RRA:AVERAGE:0.5:288:797    \
            RRA:MAX:0.5:1:600          \
            RRA:MAX:0.5:6:700          \
            RRA:MAX:0.5:24:775         \
            RRA:MAX:0.5:288:797

This is from the RRD tutorial, and has 600 samples of 5 minutes, 700 of
30minutes, 775 of 2hours and 797 of 1day.

Now, to my understanding, I'd need to modify that, so that I have 228
samples of 5 minutes (the last 24hrs),  1488 samples of 30 minutes (the last
31 days, or month), and 365 samples of 1 day (the last year).

Just quickly how I came about these sample numbers...
Daily graph is updated every 5 minutes in accordance to MRTG.  Therefore,
24hrs * 60 = 1440 minutes in the day.  1440 / 5 minutes = 288 5minute
samples.

My monthly graph: 31 days in the month * 24hrs = 744 hours in the month, *
60 = 44640 minutes in a month, / 30 = 1488 30minute samples to achive a
monthly graph

Yearly graph is the easiest.  365 days in a year :-)

This leaves me with a few questions...
Firstly, I presume because my longest period is 365 1 day periods, that this
database will only hold the information for 1 year.  If I wanted to archive
it for the last two years, do I simply add another RRA with 730 samples of
1day?  And how will this affect the graph?

Secondly, do I need additional RRA details to achieve graph 4 (as per below)
?

Thirdly, why can't I simply use 210240 samples of 5 minutes (two years) and
use 1 RRA?  I can surely graph all four my required graphs from one RRA by
using the start / stop time in the graph command?

Lastly, as I have described my scenario, do I need to have the RRA:MAX ?  To
what I understand, the RRA:MAX is used to record and graph maximum values.
As I understand, for simple in/out traffic graphs, I am not going to need
MAX because these numbers are recorded on a AVERAGE number taken from snmp
or whatever source you use.  Right / Wrong?

So, I should create and populate my database as follows (updated every 5
minutes):
rrdtool create myrouter.rrd \
  DS:input:COUNTER:300:U:U \
  DS:output:COUTER:300:U:U \
  RRA:AVERAGE:0.5:1:228 \
  RRA:AVERAGE:0.5:6:1488 \
  RRA:AVERAGE:0.5:288:730

This, to my understanding, created the database with 228 samples of 5
minutes, 1488 samples of 30 minutes, and 730 samples of 1day.  Question....
the 1, 6, and 288 values in the RRAs, they specify if its an 5minute,
30minute, or 1day sample right...  How are these numbers calculated?  1 =
5min, 6 = 30min, and 228 = 1day... Why?

> Funny you say graphing leaves something to be desired.
> Graphing capabilities are usually what draw people
> to the whole MRTG/RRDTool world in the first place.

WHOA!  Clarification time!  I was refering to myself, not to mrtg to
RRDTool.  I think both tools are excellent, and I've been using mrtg for a
few years now - I even have some stuff contributed for it.  I'm just
confused by the whole complexity of the graphing in RRD, and thus by no
means am I ripping anything off, or trying to be negative here.  The problem
lies with myself, and I need to get the help I need - which is what I've
attempted by this email...

I'm a very big fan of MRTG, and MRTG is installed and used on every single
system that I use / administrate.  Because of the complexity of the graphing
I am starting to do now however, I just feel it's time for me as an
individual to start following the chain of evolution, and start to bring in
RRD into what I require... Nothing bad is ment, and if it was taken up in
such a way, I really do want to apologise - it was seriously not intended in
such a manner...

> Have you checked out the MRTG FAQ
> (http://faq.mrtg.org)?  If you want to add something
> to it or think you have an idea how to make it better,
> I'm sure the powers that be are always willing to
> listen...

Thanks, I'll have a look :-)  I'm not sure how much MRTG's information is
going to help me getting RRD under the belt, but I'm definately going to
give it a try at least.  It's always better to figure things out yourself,
than to rather be spoon fed by someone else.  Sorry for all the questions
and stuff...  I'm just trying really hard here to understand RRD and to get
to use it in the ways I want to, rather than to waiste 48+ hours at a time
to wait for data only to see a database is wrong :-(

--
me


> >>> "Chris Knipe" <savage at savage.za.org> 08/10/02 13:53 PM >>>
>
> Lo all,
>
> Not wanting to sound like a pathetic lazy newbie here (Newbie to RRD I am
> though, lazy I don't think), I've read through the various documentation
> that comes with RRDTool over 25 times now (As well as a mini-howto I found
> via google).  Either I am just really stupid, and unfortunately maths
never
> was my strong point - which is making my quest harder I think.
>
> I was wondering if anyone perhaps know of some really good docs explaining
> how RRD works.  I think I've managed to get the creation of the databases
> under my belt, but the graphing, leaves ALLOT to be desired.  I am totally
> clueless as to how to create the graphs I want, and are semi-clueless on
the
> creationof databases.
>
> To give you guys a example of what I want to achieve right now (perhaps
one
> of you would be so kind to provide me with the code to create the db and
do
> the graphing - though, I'd still like to RTFM on my own)...
>
> I want to monitor Cisco serial ports, and capture incoming and outgoing
> traffic, 2yrs worth of archives.  Now that's fairly easy, I think I've
> managed to get a DB for this.
>
> Now, I want to create 4 graphs out of this information.
>
> 1) Incoming / Outgoing Traffic in the last 24hrs (MRTG Equivalent)
> 2) Incoming / Outgoing Traffic in the last month (MRTG Equivalent)
> 3) Incoming / Outgoing Traffic in the least year (MRTG Equivalent)
> 4) Total traffic used in the *current* Month.  With a additional line,
> indicating anything below a threshold (say, 1GB) in one colour, and
> everything above the threshold in a alternative colour. (Should be only
from
> 01/01/01 to 31/01/01 for example, hence, the total traffic incoming over
the
> interface, for the current month it is in).
>
> Additionally, I'd also like to know how I can export RRD's data to a CSV
> type file.
>
> I am *totally* clueless as to how I can achieve this...  The docs are good
> however, I'm sure it's just me that's being rather stupid, and once I get
> the proper syntax, I'm more than likely going to kick myself for not
> thinking of it myself - but after battling with this for two months now, I
> need to find a solution rather quickly, seeing that my deadline to
implement
> the system is slowly crawling nearer and nearer.
>
> Thanks allot :-)
>
> --
> me
>
>
>
> --
> 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
>
>
> --
> 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
>
>

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