[aggregate plugin] maximum oddness...

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
sodium
Cacti User
Posts: 115
Joined: Wed Feb 01, 2006 10:29 am

[aggregate plugin] maximum oddness...

Post by sodium »

suppose I have 2 datasources (in seperate rra's) let's say from 2 firewalls and I want to see the maximum number of sessions going through the cluster.

Code: Select all

Minute 05 10 15 20 25

A:     50 50 30 30 30
B:     30 30 30 60 30

sum:   80 80 60 90 60
the plugin calculates the summary (correct) and draws the correct line

where Amax = 50 and Bmax = 60 and the aggregate max is 90 (on minute 20)

This is all true now comes the problem -- I want to keep the maximum in the graph (so I can see months from now the maximum sessions) and created GPRINT summarizing Amax and Bmax but what's got printed is 110 (Amax + Bmax) and not the expected 90 is there a way to fix this?

this is an example as the real data is a lot bigger (10 rra) but because that would make things a bit more difficult :wink:
Last edited by sodium on Wed Oct 03, 2012 4:54 am, edited 3 times in total.
All the problems of the world could be settled if people were only willing to think...
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: aggregate oddness

Post by victorantunes »

sodium wrote:suppose I have 2 datasources

Code: Select all

Minute 05 10 15 20 25

A:     50 50 30 30 30
B:     30 30 30 60 30

sum:   80 80 60 90 60
the plugin calculates the summary (correct) and draws the correct line

where Amax = 50 and Bmax = 60 and the aggregate max is 90 (on minute 20)

This is all true now comes the problem -- I want to keep the maximum in the graph (so I can see months from now the maximum sessions) and created GPRINT summarizing Amax and Bmax but what's got printed is 110 (Amax + Bmax) and not the expected 90 is there a way to fix this?
Wait a second, you just said that Amax=50 and Bmax=60.

Now, if you create a GPRINT to summarize both MAX from either variable, it'll be 50+60=100. Seems to me like it's correct.

From the way I understand it, it'll take into account the MAX from each data source in the specificed same time range, regardless of the time when each MAX occurred (again, in the specified time range).
sodium
Cacti User
Posts: 115
Joined: Wed Feb 01, 2006 10:29 am

Re: aggregate oddness

Post by sodium »

victorantunes wrote:...Wait a second, you just said that Amax=50 and Bmax=60.

Now, if you create a GPRINT to summarize both MAX from either variable, it'll be 50+60=100. Seems to me like it's correct.

From the way I understand it, it'll take into account the MAX from each data source in the specificed same time range, regardless of the time when each MAX occurred (again, in the specified time range).
Look closely at the calculated sums. the maximum number of sessions on the 20th minute = 90 (30+60) but the gprint is using the 50 of the 10th minute and the 60 of the 20th minute and tell me the max is 110 and this is wrong....
All the problems of the world could be settled if people were only willing to think...
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: aggregate oddness

Post by victorantunes »

I understood what you said, but it seems you didn't understand what I said.

Assuming all the poll cicles in your example (from 5th minute to 25th minute) are in the same selected time span on the graph,
going from what I understand about RRDtool (which isn't much, btw), MAX value won't be assigned to the 25th minute, for example.
Instead there's a MAX value for the entire time span, being one for each data source.

Going by that logic, you have two MAX values (because you have two data sources), and in your selected time span in the graph (ranging from the 5th to the 25th minute), Amax = 50 and Bmax=60, meaning the sum of MAX values acquired in the range from the 5th to the 25th minute is 50+60=110.

But then, I could be wrong.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: [aggregate plugin] maximum oddness...

Post by gandalf »

Both of you are correct.
In case no consolidation occurs, the approach that ends up in "90" is correct.
But in case you perform a MAX cosolidation, eventually the intervals are aggregated and as such the specific condition at timestamp 20 "get's lost in consolidation" and is replaced by an "overall MAX" which, when added, may yield a value of "110".
So, both the CDEF used and the CFs used are of importance. Unfortunately, current Cacti does not allow for all valid permutations of CFs, so that might turn out to be a problem.
In case you assume that "omitting consolidation" would help, I must say (as I already did more than once), that at least the "graphical consolidation" will hit you right and square.
So better ist to make your life WITH consolidation.
R.
sodium
Cacti User
Posts: 115
Joined: Wed Feb 01, 2006 10:29 am

Re: [aggregate plugin] maximum oddness...

Post by sodium »

gandalf wrote:...In case you assume that "omitting consolidation" would help, I must say (as I already did more than once), that at least the "graphical consolidation" will hit you right and square.
So better ist to make your life WITH consolidation.
R.
so there is no way for me to see (in text or graph) how many sessions went through the cluster when the CF did some magic after 25hours...
All the problems of the world could be settled if people were only willing to think...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: [aggregate plugin] maximum oddness...

Post by gandalf »

No, that's not meant.
You may pm/email an exported graph template along with the related rrd files to me.
At least, please post the "rrdtool graph" statement from Graph Management -> Debug to help
R.
EIPCT
Posts: 1
Joined: Fri Oct 12, 2012 7:55 am

Re: [aggregate plugin] maximum oddness...

Post by EIPCT »

Aggregate must consolidate weekly values... before calculate MAX
There is a big difference between :
- for each Graph, find the MAX value on 30 min and add these MAX
- aggregate each Graph by Step 5min and find the MAX
Attachments
my example :
my example :
RRD and Aggregate.GIF (12.34 KiB) Viewed 3895 times
sodium
Cacti User
Posts: 115
Joined: Wed Feb 01, 2006 10:29 am

Re: [aggregate plugin] maximum oddness...

Post by sodium »

@ EIPCT that is exactly may problem :-)

and I'm looking for a way so I can see the maximum was (in your example) = 26 and that that value is not consolidated over a period of time.
All the problems of the world could be settled if people were only willing to think...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: [aggregate plugin] maximum oddness...

Post by gandalf »

To cut things short: due to "normal workload", I'm not able to check this as soon as I was willing to.
Here's a possible workaround: In case you find an rrdtool graph statement that accomplishes this, I will try to make this work with 089. No chance (at least I fear so) before that. You may ask on the rrdtool-users mailing list
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest