Aggregate, now at V0.66

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Locked
basf_audio
Posts: 40
Joined: Thu Feb 26, 2004 10:30 am
Location: Saint Louis

Found it...

Post by basf_audio »

I was able to run the queries for the database outside of the scripts... Just ran into the same issue earlier in this thread about leaving out the:

DEFAULT CHARSET=latin1

In the query...

I have found another odd issue now that I've started creating a few of these graphs...

The Text Format after the graph is made show the original Text Format data twice. So if the individual graph said "server A" the new Text Format says "server a server a"

Any reason for seeing it twice in there?

_DS
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: reply

Post by johnrembo »

kuma3 wrote:To reply my own question, it looks like all my data sources for those graphs were gone after I aggregate them. I am trying to reproduce it again now.

I am pretty sure those graph I selected for aggregation where there.
i have also completely lost my data-sources after aggregating them (that was on 0.8.7). On 0.8.7a half of aggregated graph items shows "NONE" instead of their appropriate data-sources.
Moreover - all of those graph items which have no related data-sources shows data of first available graph-item.
to sum up - this is wonderful plugin, but worked like a kind of cacti-virus.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The mistake that many make when managing/deleting non-templated graphs is to delete all associated Data Sources at the same time, which will act as a virus. I've done it a few times. Non templated graph management must be done "very" carefully.

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?
darkan
Posts: 5
Joined: Tue Jan 29, 2008 5:10 am

Post by darkan »

Hi all,
Great Plugin! ;) but i've a problem...
i didn't understand how to sum multiple data into an aggregate graph.

i've multiple interface (for ex. 4 interfaces on 2 switches)
so i've

switch A - eth1 IN
switch A - eth1 OUT
switch A - eth2 IN
switch A - eth2 OUT

switch B - eth1 IN
switch B - eth1 OUT
switch B - eth2 IN
switch B - eth2 OUT

it's possible to have a graph with ONLY

total IN
total Out

where total IN is the "SUM" of total kbs IN on all interfaces
and total OUT is the "SUM" of total kbs OUT on all interfaces ?

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

Post by gandalf »

It is possible, but only by post processing AGGREGATE graphs manually to a great extend. There's no automatism for it
Reinhard
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

gandalf wrote:It is possible, but only by post processing AGGREGATE graphs manually to a great extend. There's no automatism for it
Reinhard
i have a small script which "eats" local graph id's or graph trees and returns total curent,average or max values acording to title and ds filters.
I use it for yearly statistical calculations to get results from more than 20K graphs.

Along with script-command data-input - it could sovle total-in total-out excercise, but, sadly, it's far from becoming part of aggregate plugin(or separate plugin).

If someone's interested - just let me know...
darkan
Posts: 5
Joined: Tue Jan 29, 2008 5:10 am

Post by darkan »

interesting,
does this script create a new graph and auto-refresh?

@ gandalf :
where i can find infos about?

Thank you,
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

darkan wrote:interesting,
does this script create a new graph and auto-refresh?

@ gandalf :
where i can find infos about?

Thank you,
nope.
truly speaking - why don't you just create two cdefs for total_in and total_out? That is the fastest and easiest way of solving your problem.
Attachments
traffic_calculation.scripts.tar.gz
II (instructions inside)
(2.69 KiB) Downloaded 211 times
traffic_calculation.scripts.zip
II (instructions inside)
(7.12 KiB) Downloaded 231 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Use a CDEF that refers to "ALL_DATA_SOURCES_NODUPS" to autmagically make them sum up
Reinhard
darkan
Posts: 5
Joined: Tue Jan 29, 2008 5:10 am

Post by darkan »

gandalf wrote:Use a CDEF that refers to "ALL_DATA_SOURCES_NODUPS" to autmagically make them sum up
Reinhard
ok,
sorry, but i don't have any idea how to do this... :)

if i add a new "row" into an aggregated graph, there is no way to have any "sum" output... :(
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Create a new CDEF that reads

Code: Select all

cdef=ALL_DATA_SOURCES_NODUPS
That's a pre-defined special data source.
Now visit your AGGREGATE graph. Add a new Graph item, type GPRINT, CF=AVERAGE, to it. Don't select any input data source but apply the new CDEF and some nice text, e.g. AVG_Total. Save and retry.
Reinhard
darkan
Posts: 5
Joined: Tue Jan 29, 2008 5:10 am

Post by darkan »

Thank you Gandalf,
but in this case, i've TOTAL of ALL DATA SOURCE, IN+OUT...
i'm looking for a separate IN and OUT total.

ex .

eth1 IN 2K
eth1 OUT 1K

eth2 IN 3K
eth2 OUT 1K

IN = 5K
OUT = 2K
darkan
Posts: 5
Joined: Tue Jan 29, 2008 5:10 am

Post by darkan »

johnrembo wrote:
darkan wrote:interesting,
does this script create a new graph and auto-refresh?

@ gandalf :
where i can find infos about?

Thank you,
nope.
truly speaking - why don't you just create two cdefs for total_in and total_out? That is the fastest and easiest way of solving your problem.
sure, i'll try to create 2 cdef,
one to SUM all data from INBOUND interfaces
one to SUM all data from OUTBOUND interfaces

then i create an aggregate graph, and add this 2 cdef as a "GPRINT".

...i'm reading cacti doc now ;)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

In this case, replace ALL_DATA_SOURCES_NODUPS with SIMILAR_DATA_SOURCES_NODUPS or the like. To make cacti aware, which kind of SIMILARity you are referring to, the graph item referring to that CDEF must point to any INBOUND or OUTBOUND data source, respectively.
If you have a graph created this way, use DEBUG at Graph Management to find the automagically summed up values
Reinhard
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

annoying error

Post by johnrembo »

one of my cacti installations after aggregate graph is created complains:
PROGERR: ERRNO:'2048' TYPE:'' MESSAGE:'Assigning the return value of new by reference is deprecated' IN FILE:'/opt/cacti/lib/adodb/adodb-lib.inc.php' LINE NO:'537'
must note - from aggregate side everything's working just fine except this error...

line itself:

Code: Select all

$recordSet =& new $rsclass(-1,$zthis->fetchMode);
removing reference(& ) solved this issue and yet - i'm wondering why was it failing...might this be a php5 issue?
Locked

Who is online

Users browsing this forum: No registered users and 0 guests