[hobbit] FW: RRD data points - need help with graph distortion

Henrik Størner henrik at hswn.dk
Mon Nov 10 22:52:00 CET 2008


In <0D2B277DB445634E85FFD372FE7B17562DF9CE51FB at AMWPVEX01.kci.com> "Wood, Mike" <Mike.Wood at kci1.com> writes:

>I asked this question last week, but maybe I wasn't clear enough as to what=
> I was asking...
>-
>Management wants to avoid graph distortion on my 60 day CPU Util graph if p=
>ossible.  I think that more datapoints would address the problem.
>The first graph looks good (30 day graph).  The 2nd one distorts what is re=
>ally going on (60 day graph - same server).  Is there any way to make the 2=
>nd graph more granular?  Thanks for looking!

There is, but it means changin the structure of the RRD files that Hobbit
creates. And it only works for new files, not existing data.

What you need to change is the "RRA" (Round Robin Archive) definition used
by Hobbit when it sets up the rrd files. Each RRA contains data that comes from
the measurements, but are averaged out over progressively longer intervals.
By default there are 4 sets of data:

* a 5-minute average with 576 data points. This corresponds almost
  directly to the individual measurements Hobbit performs, since they
  are also done at 5 minute intervals. It holds 576*5 minutes = 48 hours
  of data.
* 6 of the 5-minute averages go into the next RRA, so this is a 30-minute
  average. Still has 576 data points, so that holds 12 days worth of data.
* 24 of the 5-minute averages go into the third RRA, making it a 120-
  minute (2 hour) average. 576 data points = 48 days of data.
* 288 of the 5-minute averages go into the fourth RRA, making it a 24-hour
  average. With 576 data points, it goes back rougly 1.5 years.

These are defined in the Hobbit sourcecode hobbitd/do_rrd.c like this:

   static char rra1[] = "RRA:AVERAGE:0.5:1:576";
   static char rra2[] = "RRA:AVERAGE:0.5:6:576";
   static char rra3[] = "RRA:AVERAGE:0.5:24:576";
   static char rra4[] = "RRA:AVERAGE:0.5:288:576";

You can see the 1, 6, 24 and 288 number of measurements that go into one
data point, and each RRA has 576 data points. Since your 30-day graph
was OK - a 30-day graph uses data from the third RRA, since that is the
most detailed one covering 30 days - then you could extend that one
to cover the 60 days you want. 60 days with a 2-hour average requires
720 data points, so if you change the "rra3" definition to
   static char rra3[] = "RRA:AVERAGE:0.5:24:720";
it should be enough to store the data you need for a 60-day graph at
2-hour resolution.

You can of course do more tweaks, adding more data points just means that
your rrd files will take up a bit more disk space.

After changing this, you must re-compile Hobbit (run "make clean; make; make install"),
and restart Hobbit. Also, this only applies to newly created RRD files, so you 
will have to delete the current RRD files - so you lose your existing data.

All of this is for Hobbit 4.2.x. The coming version makes the RRD definitions
configurable without having to muck about with the source code.


Regards,
Henrik




More information about the Xymon mailing list