Changing Granularity on-the-fly...

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Aholics.com
Posts: 3
Joined: Sat Jun 03, 2006 6:58 pm
Contact:

Changing Granularity on-the-fly...

Post by Aholics.com »

I'm curious if Cacti can do this...

Say for example you have a 10-minute polling cycle and data is stored in the RRD at this interval. For example, below is two hours worth of data...each is a count of <whatever> happening during that 10 minute interval:

1: 5
2: 8
3: 9
4: 3
5: 13
6: 13
7: 4
8: 4
9: 5
10: 10
11: 8
12: 3

So, a very simple graph. Now, the question is...if I wanted to see the count on a per-hour basis...can this be done? Note that I'm NOT looking for the average for each hour. More examples, please let me know what can be done:

Example #1: Just show the graph with a new granularity, set to 1 hour (instead of 10 minutes). I assume this would just show an average:

1: 8.5 = (5+8+9+3+13+13) / 6
2: 5.6 = (4+4+5+10+8+3) / 6

Example #2: This is the one I really need. Instead of just showing the graph with less granularity, I want to be able to show the total count for each entire hour:

1: 51 = 5+8+9+3+13+13
2: 34 = 4+4+5+10+8+3

Thoughts?

Thanks,
AL
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Simple approach: create a CDEF that multiplies by 6 (in this example)

Code: Select all

CDEF=CURRENT_DATA_SOURCE,6,*
More to be found at http://www.vandenbogaerdt.nl/rrdtool/total.php
Reinhard
Aholics.com
Posts: 3
Joined: Sat Jun 03, 2006 6:58 pm
Contact:

Post by Aholics.com »

lvm,

Thanks for the reply...but I think you might have misunderstood my question. It seems to me that this will simply multiply each datapoint by 6, which really is not what I need.

Any ideas out there?
Aholics.com
Posts: 3
Joined: Sat Jun 03, 2006 6:58 pm
Contact:

Post by Aholics.com »

After talking this over with someone here at the office, it appears this actually can work. By multiplying by 6, and then changing the granularity, the average naturally provides the values we're looking for. Good stuff! Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests