Aggregate Plugin

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

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

Aggregate Plugin

Post by gandalf »

Hi all,

currently, I'm working on a new Plugin: Aggregate

Planned Features:
basics
  • is based on existing graphs with existing data sources (=rrd files)
  • will not create any new rrd file
  • will create a new Graph based on a list or previously selected Graphs from Graph Management
  • will not use Graph or Data Templates (is not related to a Graph Template, in other words: Graph Template = NONE)
  • will prepend each GPRINT line with the target host's name
  • will act as a normal graph, so it will allow for usual modifications
This part is already functional. Now to the options. Currently, the following is implemented. I try to describe it briefly, but i fear that no one will understand :cry:
  • optionally use "Aggregate Templates" to change graph items behaviour when aggregating them
  • Aggregate Templates or to be defined manually. They lokk very much like graph items. Following features are supported:
  • suppress a graph item (used e.g. to suppress 95th Percentile Comments that are of no use for an aggregated graph)
  • override Graph Item Type e.g. to change an AREA for multiple traffic graphs to a STACK
  • override CF type. Currently I have no real use for this. But it was easy to code ...
  • override CDEF e.g. to show Traffic Output on the negative y-axis (cdef=current_datasource,-8,*)
  • override sequence. Straighformat operation for e.g. a Graph with 2 data sources would be to have the aggregates items ordered first by host, then by data source (e.g. all items below the previous one). To have aggregates ordered first by data source (e.g. all input ds grouped together and all output ds grouped together), you have to change the sequence
  • change color. In most cases you will aggregate graphs, where same colors occur on each basic graph. To override this, you may define a new color
Please find some screenshots attached.

But currently I'm not satisfied. I tried to explain this plugin to the participants of the 1.CCC.eu Cacti Community Conference. Apart from a coding error I had the impression, that these aggregate templates are too complicated.

Please see my alternative approach in the next post.

Reinhard
Attachments
Aggregate Template
Aggregate Template
templates.png (75.71 KiB) Viewed 32626 times
Aggregate with Template applied<br />See the order of GPRINT lines!
Aggregate with Template applied
See the order of GPRINT lines!
result-with-template.png (90.93 KiB) Viewed 32626 times
Aggregate without template usage<br />See the weird 95th Percentiles and pay attention to the GPRINT ordering
Aggregate without template usage
See the weird 95th Percentiles and pay attention to the GPRINT ordering
result-without-template.png (93.01 KiB) Viewed 32626 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Now to the second approach. Goal of my new ideas is to avoid those complications introduced by the "Aggregate Templates". I try to compare both approaches
  • suppressing a graph item must be done manually after the aggregate was created
  • allow for a selection
    • no modification
    • create a stacked graph (first item=AREA, following=STACK)
    • create a line graph (all items = LINE1)
  • override CF type is skipped
  • overriding CDEF must be skipped. I have no solution for this. But if your base graphs already show output traffic on the negative y-axis, this is not a must
  • Instead of overriding sequence introduce a dropdown to change ordering
    • no changes
    • order by host, then by data source
    • order by data source, then by host
  • change color. This is a must. I'm thinking of building sth like "color schemes". You may create those schemes, which are simply a sequence of colors (so you may create nice "fire effects") and associate them to an aggregate by name via a dropdown selection.
Please add your comments or new approaches. I will start coding this weekend

Reinhard
gru
Posts: 11
Joined: Fri Jun 02, 2006 2:46 am

Post by gru »

Hello gandalf,

I like the second approach (without "Aggregate templates") more. Honestly, I understood it better than the first one.

Would be great to test it, since I would like to know how useful it is to compare host's in a cluster very easily by selecting graphs.

Greetings,
Johannes
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Gandolf the White,

My comments will be brief, I have a conference call in 8 minutes. I have given this much through. I was thinking of a Wizard approach instead of Templates. What I would do is as follows:

1) Select the "Data Sources" that I wanted to have an aggregate graph for
2) From the Data Source Drop Down, I would select "Create an Aggregate Graph"
3) From that point, you would be presented a screen that would allow you to, for each Data Source, select; from one to many CDEF's, one of many GPRINT formatting options, Object Type ("LINE", "AREA"), Graph Order, and Color.

It would suffice it to say that it would not cover ALL graphing possibilities. But that's the old 80/20 rule.

My $0.02 Cents..

Larry
Last edited by TheWitness on Thu Jan 18, 2007 2:59 pm, edited 1 time in total.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Fine, then. Currently, the code for maintaining Color Templates is ready. Please find a screenshot attached. But it still has to be attached to the main code.
Currently, I'm thinking about leaving the Aggregate stuff as is. Well, it was some time of coding, so why not keeping it? Of course, if would be optional. So leave it alone if you don't like it. If no one likes it, it would be easy to remove it.
Unfortunately, I will have to spend some time on two other topics: Time Shifter for 0.8.6j and some debugging for an awful failure; now that I'm quite close to it.
So this may not be ready this weekend.
Reinhard
Attachments
Bildschirmfoto-1.png
Bildschirmfoto-1.png (25.71 KiB) Viewed 32284 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cool. You did get my modified PHP file right? On the call now ...

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote: 1) Select the "Data Sources" that I wanted to have an aggregate graph for
2) From the Data Source Drop Down, I would select "Create an Aggregate Graph"
3) From that point, you would be presented a screen that would allow you to, for each Data Source, select; from one to many CDEF's, one of many GPRINT formatting options, Object Type ("LINE", "AREA"), Graph Order, and Color.
Your approach is based on Data Sources. First, I was thinking the same way. But I thought, that associating each and every Data Source with the sum of "Color, Line Type, CF, CDEF, perhaps some text and HR" would be tedious.
Then, I was thinking more of some "one for all" setting, that is: defining only one set of attributes that would be applied to all Data Sources. But all this GPRINT stuff and more specialties kept me away from this. Please take into account, that I'm not a native php coder.
So I changed to the Graph-based approach. It was easier to copy some existing code and change it to my needs.
All-in-all, it was and is quite fun to create some code again :wink: That's not usual with my current business.
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote:Cool. You did get my modified PHP file right? On the call now ...

Larry
Yep, I did. Thanks. But it has really changed a bit. Last weekend, I was too tired to spent time on it. But I definitively will do this soon. Sorry, that it was not in time for 0.8.6j.
Unfortunately, I crashed my system last weekend. I decided then, to start with more current releases of everything, and it took some time. But I suppose that I'm close to debugging that error sometimes reported on the forums, where interface graphs are not created correctly. I hope, I will be able to reproduce it on my DSL router and then I won't let it slip away again.
If I find time, I will continue on the plugin, then.
Reinhard
User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

Post by sizulku »

I would like to try aggregate plugin but can't find it anywhere. Is it avalaible for public?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Not yet. Unfortunatly, the burdon of sorting aggregated items in a meaningful way is harder than I thought it would be.
And the "Aggregate Template" stuff, which is still available, is quite hard to explain. But if you volunteer for pre-alpha tests, I won't stop you. I'm quite sure, that the code would not destroy your cacti completely. If you are still willing to volunteer, please pm your email address
Reinhard

PS: The code will change significantly, that's for sure
User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

Post by sizulku »

Thanks for your reply. I would love to be your volunteer. What I would like to see with aggreagte plugin is to aggregate 30 data source into a graph, is it possible?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

To be honest, I did not try 30 ones, as my laptop at home does not see that many devices ...
But it "should" work.

I will strip down the current development version for a very plain and straightforward solution. It will simply create aggregates from a list of selected Graphs. It will include every Graph Item of every Graph (no skipping any COMMENTs, Totals or stuff that will yield funny results on aggregates) in the sequence they appear on the base graph. It will not change colors (this is a must for a usful plugin, of course). And it will prepend each AREA/LINEx item with the hostname for that item to distinguish the hosts in the aggreated graph.

If I do not fall ill again, I will post it this weekend

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

Post by gandalf »

Please find the plugin here. It will produce results like the very first picture of my first post (see above)
Reinhard
eschoeller
Cacti User
Posts: 234
Joined: Mon Dec 13, 2004 3:03 pm

Post by eschoeller »

what is the status of this plugin? Will it ever be available directly from the cactiusers website?
eschoeller
Cacti User
Posts: 234
Joined: Mon Dec 13, 2004 3:03 pm

Post by eschoeller »

Hmm, it doesn't appear to work well with 0.8.7b, that is a shame.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest