Calculating graphs from RRA's...

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

Moderators: Developers, Moderators

Post Reply
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Calculating graphs from RRA's...

Post by hamish »

OK. I know how to create new data templates, and get them gathering into RRD's.

I know how to run RRDTool by hand to do whatever I need...

But now I seem to have hit a brick wall. I want to take two RRA's, and use them to calculate a percentage and graph the percentage. How do I convince cacti to do this? There doesn't seem to be any obvious way to take say total memory & used memory RRA's and graph the percentage used without graphing the raw rates...

Or am I missing something? (Possibly CDEF's, but then I still can't find anywhere that says what 'a' and 'b; are that are used in the CDEF's OOTB...



TIA
hamish.
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Post by hamish »

OK. I'm getting further. I managed to find that when defining CDEF's the DS's are named 'a, b, c etc in the order that graph items are defined.

But I don't want to graph the raw RRA's... I only want ot graph the results of the CDEF's...

How do I suppress the drawing of the raw RRA values? There's only options for

COMMENT - Only outputs the comment text?
HRULE/VRULE
LINE1,2,3
AREA
STACK
GPRINT
LEGEND

There doesn't seem to be an option for just define this as a dataSource...

Again... Am I missing something? Or am I asking cacti to do something that it can't? Or is there a better way to define the template rather than going through the WebInterface? (i.e. can I define what I want in an XML template? Or hand-edit a table or config file somewhere?

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

Post by gandalf »

You're getting closer. In fact, you seem to know your rrdtool!

Suppressing data is best done by CDEF=CURRENT_DATA_SOURCE,0,*

Yes, it is this simple.

Cacti 088 will support COMPUTE data sources. They will ease e.g. percentage calculations (within an rrd file only, for sure)
Reinhard
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Post by hamish »

Ah cool. Thanks for that.

Will the COMPUTER type have an option to name the variable used as well?

I'm trying to rely on a, b, c etc, but it seems to be allocated in the order they're defined, rather than the order I'm putting them in the list of items... (Or I could just be running up against a problem where adding a graph item doesn't seem to guarantee it'll be created if I don't then delete and create the graph again).

(Plus of course having names would make things easier to read with the CDEFS).

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

Post by gandalf »

hamish wrote:Ah cool. Thanks for that.

Will the COMPUTER type have an option to name the variable used as well?
Sure
I'm trying to rely on a, b, c etc, but it seems to be allocated in the order they're defined, rather than the order I'm putting them in the list of items... (Or I could just be running up against a problem where adding a graph item doesn't seem to guarantee it'll be created if I don't then delete and create the graph again).
Yes. So it is doable, if you take a "raw" template as a first shot to get the a, b, c, ... letters. It's the only way to do it now.
Reinhard
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Post by hamish »

gandalf wrote:
hamish wrote:Ah cool. Thanks for that.

Will the COMPUTER type have an option to name the variable used as well?
Sure
Ah... Cracking... That'll make it a lot easier to produce the graphs I've been doing by hand then. I've been fighting to get them done but keep striking a few bits like this...

In the new version, is it going to be a bit easier to define data queries for SNMP indexed tables? I seem to be having problems following how the .xml files are related to the data template...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

No, the XML stuff will be mostly kept. You alreday read my HowTo (1st link of my sig)?
Reinhard
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Post by hamish »

gandalf wrote:No, the XML stuff will be mostly kept. You alreday read my HowTo (1st link of my sig)?
Reinhard

No... What sig?

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

Post by gandalf »

Please login to see my sig
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest