Aggregate, now at V0.66

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

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

Aggregate, now at V0.66

Post by gandalf »

Thread closed. New Version 0.70 is published right now
Updated code V0.66 attached to this post (see below)
Support added for PIA 2.0 and Cacti 087
This plugin is the new version of my Aggregate Plugin V0.2 (See this url for some more statements and images)

Installation:
- tar -zxf into ./plugins/aggregate folder
- change ./include/config.php to add the plugins line for "aggregate", as usual
No more need to manually import the table sql

Learn from README
When aggregating, you will be prompted

- Title Format:
Enter a new title for the Template.

- GPRINT Prefix:
Enter an optional GPRINT Prefix, e.g. |host_hostname|-|query_ifDescr|

- Graph Type:
Select one of the following
Keep Graph Types - no changes to Graph Item Type
Make it an AREA/STACK Graph - create an AREA/STACK Graph
Make it a LINE1 Graph - convert to LINE1

- Graph Template Items
Select a given Color Template to change the color of a Graph Item
Select the "<HR>" checkbox to set a linebreak for that graph item
Select the "Skip" checkbox to suppress this Graph Item for the Aggregate
See examples attached
Reinhard
CHANGELOG

--- 0.66 ---
Tweak: Cleanup of README
Bug fix: Support issues with PIA2.1 fixed. Compatibility with 086j is still maintained

--- 0.65 ---
Tweak: Code cleanup, mostly commented stuff removed
Feature: New "GPRINT Prefix", defaults to |host_hostname| to mimic previous behaviour
Feature: PIA 2.0/Cacti 087 support
Bug fix: Do not specify a default character set for tables. latin1 is not
universal

--- 0.64 ---
Bug fix: Escape cacti database names using strange characters (StephenKing)
Compat: Compatibility with Cacti 0.8.7

--- 0.63 ---
Bug fix: Color is associated even if not using a color template
Feature: Required tables are auto-created

--- 0.62 ---
Bug fix: Initialization issues

--- 0.61 ---
Bug fix: Error, when deleting a Color Template
Tweak: include statements use $config path variables

--- 0.6 ---
Added checkboxes for <HR>. On specific Graph Templates, it will not be possible
to compute all needed <HR>s. So we prompt you to set them manually.
bug: LINEx graphs converted to AREA/STACK will now have AREA on the first graph items

--- 0.5 ---
Managing of Color Templates
Referring to Color Templates allows for different colors for same data source

--- 0.4 ---
Add skipping of selected Graph Items

--- 0.3 ---
Add Graph Type Conversion

--- 0.2 ---
First public release, very basic functions

--- 0.1 ---
Initial release, first shown at 1.CCC.eu, the 1. European Cacti Community
Conference.
Attachments
aggregate-066.tgz
The Code V0.66
(23.87 KiB) Downloaded 2665 times
New GPRINT Prefix
New GPRINT Prefix
Aggregate-with_graph_Type.png (22.96 KiB) Viewed 63819 times
Result, when selecting to convert to LINE1
Result, when selecting to convert to LINE1
Result-Line.png (51.3 KiB) Viewed 93569 times
Result, when selecting to convert to AREA/STACK
Result, when selecting to convert to AREA/STACK
Result-Stack.png (52.03 KiB) Viewed 93569 times
Last edited by gandalf on Sun Jan 18, 2009 7:56 am, edited 18 times in total.
hgd26
Posts: 25
Joined: Fri Oct 06, 2006 5:36 am

Re: Aggregate V0.3

Post by hgd26 »

Great plugins! But with little bugs in code ... :wink:
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please share your knowledge with me and post those errors (or better: fixes, if you were able to solve them). Please bear in mind, that my development environment still contains fragments of "new approaches". This may cause problems with incomplete packaging.
Reinhard
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

Hello Gandalf,
there is a patch in the package. Do I have to apply the patch? It's not mentioned anywhere.
And btw. there is no entry in the action menu on the Graph Management page. I can not even activate it under realm permissions.

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

Post by gandalf »

The patch is needed for plugin arch v1.0 only. Arch V1.1 includes the needed hooks (Thanks to cigamit). So if you're still running the V1.0, apply the patch.
Realms are currently not needed. But without the correct hooks (be it via patch or via Arch V1.1) you won't see the new Action
Reinhard

PS: Find the other picture in the V0.2 post
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

Ok, I've checked my installation. It is plugin archiceture v1.1. But no menu entry in the graph management section:(
Is there a possibility to debug a plugin somehow?

Dagonet
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Post by dagonet »

dagonet wrote:Ok, I've checked my installation. It is plugin archiceture v1.1. But no menu entry in the graph management section:(
Is there a possibility to debug a plugin somehow?

Dagonet
Solved. One might add the necessary line to the config.php...

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

Post by gandalf »

dagonet wrote:Solved. One might add the necessary line to the config.php...

Dagonet
Ok, this is needed for ALL plugins. So I forgot to mention this explicitely. Will extend my post
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

dagonet wrote: Is there a possibility to debug a plugin somehow?

Dagonet
Yes. I've left lots of debugging stuff in the code. It's always a three-liner, calling the cacti_log function. Un-comment those statements and find results in the cacti.log. It works for DEBUG=LOW (to prevent lots of messages when running on DEBUG level). You may want to

Code: Select all

tail -f ./log/cacti.log
on a second xterm session while performing the tests.
If there's anyone out there, who is able to tell me about web-debugging running Eclipse with PHP IDE, I really would be glad.
Reinhard
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Reinhard,

Can you give me a few screen shot's of the Eclipse PHP IDE.

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?
salami
Posts: 2
Joined: Tue Feb 06, 2007 2:45 am

Post by salami »

Hi everyone

I'm pretty new to cacti and the aggregate plugin, but so far I really love it!

I managed to create a graph that shows the aggregated traffic of both my routers in one graph. I there a way to have the aggregated "Total In" and "Total Out" and not the separated values?

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

Post by gandalf »

Yes, but that requires manual post-processing, see http://www.cacti.net/downloads/docs/htm ... _VARIABLES
Reinhard
salami
Posts: 2
Joined: Tue Feb 06, 2007 2:45 am

Post by salami »

awesome! works like a charm, thanks a lot!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

New ideas. Please comment and prioritize

- Need for filtering Graph Items /Data Sources
You will not always want to include all Graph Items available. You may want to omit e.g. certain Comments are even a complete Data Source.
I'm planning to promt the user with a Graph Items List made up from the first Graph (or the Graph Template of the first Graph which should produce quite teh same results). Each Graph Items line of this list would show a "Skip this Item" checkbox. When checked, this Graph Item will be skipped for all graphs to be aggregated

- Need for Colorization
Graph Items will have same color in most cases. Ugly. I'm planning to allow for creating "Color Templates". They simply will be an ordered list of color tags, e.g. from light red to deep red (This code is already available).
Then, I'd like to associate each Graph Item of the above list with any single Color Template. This should yield the following result:
Graph Item of 1st Graph = 1st Color of the Color Template
Graph Item of 2nd Graph = 2nd Color of the Color Template
...
This part is still missing and would take some time for me as an unexperienced php coder.

Another option would be:
Increment color_id from Graph Item to Graph Item. But this may produce ugly colorization. I already coded this some weeks ago, but was not satisfied


I'd like to hear your comments

Reinhard
tdjb
Posts: 18
Joined: Mon Oct 16, 2006 6:29 pm

Post by tdjb »

First off, thanks gandalf, this plugin is very nice and something I was looking for.

Is there any chance that you might have plans to add in a sort of "time span" feature? I'm trying to compare one graph/data source over two different time spans.
So for example I could create a comparison of the data from graph one for the first week of January VS. the data from graph one for the first week of February.
Locked

Who is online

Users browsing this forum: No registered users and 2 guests