Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
minute: 0 1 2 3 4 5
value: 0 30 60 60 120 150
difference 0 30 30 0 60 30
COUNTER: 0 0.5 0.5 0 1 0.5
Regular Consolidation 5 points using AVERAGE CF: 0.5 + 0.5 + 1 + 0.5 = 2.5/5 = 0.5 per sec
Totaling difference 5 points (what I want): 30 + 30 + 60 + 30 = 150 (totaling all differences between each reading (so that at 5 pt consolidation, it looks like we polled every 5 minutes, not every minute), not divided by any time frame)
So basically, is there a way to alter the display of COUNTER data type, to instead of displaying per seconds, to display per step size at each higher level of consolidation (Daily, Weekly, Monthly, Yearly). That means never do the division by step_size and always adding the difference of each reading. So Daily would be the total for 5 min, Weekly would be the total for 30 mins, and so on.
So how to display COUNTER, not as rate of change per second, but showing the difference at each reading ?
Thanks,
Long
Last edited by long on Thu May 05, 2011 9:15 am, edited 1 time in total.
minute: 0 1 2 3 4 5
value: 0 30 60 60 120 150
difference 0 30 30 0 60 30
COUNTER: 0 0.5 0.5 0 1 0.5
Regular Consolidation 5 points : 0.5 + 0.5 + 1 + 0.5 = 2.5/300sec = 0.0083 per sec
Totaling difference 5 points (what I want): 30 + 30 + 60 + 30 = 150 (totaling all differences between each reading (so that at 5 pt consolidation, it looks like we polled every 5 minutes, not every minute), not divided by any time frame)
So basically, is there a way to alter the display of COUNTER data type, to instead of displaying per seconds, to display per step size at each higher level of consolidation (Daily, Weekly, Monthly, Yearly). That means never do the division by step_size and always adding the difference of each reading. So Daily would be the total for 5 min, Weekly would be the total for 30 mins, and so on.
So how to display COUNTER, not as rate of change per second, but showing the difference at each reading ?
Thanks,
Long
As told on the rrdtool mailing list, e.g. http://www.vandenbogaerdt.nl/rrdtool/total.php explains the trick (unfortunately, we do not yet support VDEF; this will be introduced with Cacti 088).
We need the AVERAGE of the interval displayed and multiply it by the timespan to get the total.
In your example, the AVERAGE is 30/min and the timespan is 5 min which results in a grand total of 150, as wanted.
R.
Best matching solution is to use http://docs.cacti.net/manual:087:6_refe ... _variables on bandwidth summation.
E.g. a COMMENT of |sum:0:current:2:auto| should do. Using |sum:auto:current:2:auto| unfortunately adds a unit description of bytes|kb|MB|GB and the like which will not match when using data sources that do not represent a traffic counter.
An example can be found in the Graph Templates for Traffic that are labeled "Total Bandwidth"
R.
I've used the "bandwidth summation" feature in my traffic graphs.
I understand what it does. It sums up all the values in the graph time range (the viewable range of the graph) so if my graph starts at day 1 and finish at day 2, it will adds up all the values within one day time range. That's not what I need.
If I am polling every 5 minutes and that 1 day time range graph has a resolution of 30 minutes, then I want each data point (that present 30 mins) to have the sum of each of the 5 minutes data points, not the sum of the whole day (not the sum of all the data points in the viewable range of the graph).
I have patched RRDTool 1.4.5 and Cacti 0.8.7g to do what I described in this thread. I introduced a new Data Type called DIFFERENCE which behave like COUNTER without the division by the step period and a new Consolidation Function SUM that does the sum.
The error you got is normal. The RRDTool patch has been developed from the trunk so on the 1.4 branch, one of the hunk didn't exist yet so that's why the failure.
Just go ahead and build RRDTool. Everything should work.