Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

95th Percentile Caculation for Aggregate (Last Month) is not accurate. #5697

Open
iskandarbasman opened this issue Mar 19, 2024 · 3 comments
Labels
aggregate Aggregate related issue confirmed Bug is confirm by dev team enhancement General tag for an enhancement
Milestone

Comments

@iskandarbasman
Copy link

Describe the bug

95th Percentile Caculation for Aggregate (Last Month) is not accurate.

To Reproduce

Steps to reproduce the behavior:
Cacti Version 1.2.25

Created a test graph on by test cacti.

  1. Using two existing 95th Percentile graphs.
  2. Created a Aggregate 95th graph.
  3. Used Preset: Last Month
  4. See cacti 95th percentile calculated as 711.16 Mbits

image

Download the CSV export of the same graph data.
Noted that Cacti 95th value as in the graph. "Nth Percentile 711157443 |95:bits:0:aggregate_peak:2|"

Compared using the same data to calculate 95th Percentile.
Excel formula is getting : 502,123,554.75
Manual calculation using approximately 95% of total sample: 508305728.43

95th percentile by Excel and Manual calculation is close to each other.
95th percentile by Cacti is over by 200Mbits.

Attached the excel file:

image
Aggregate - test 19 mar 2024.xlsx

`
RRDtool Command:

/usr/bin/rrdtool graph -
--imgformat=PNG
--start='1708307700'
--end='1710813147'
--pango-markup
--title='Aggregate - test 19 mar 2024'
--vertical-label='bits per second'
--slope-mode
--base=1000
--height=200
--width=700
--rigid
--alt-autoscale-max
--lower-limit='0'
COMMENT:"From 2024-02-19 09:55:00 To 2024-03-19 09:52:27\c"
COMMENT:" \n"
--border 1
--slope-mode
--watermark 'Generated by SPTEL Cacti®'
DEF:a='/var/www/html/cacti/rra/1nete-ne20e-s1_traffic_in_2562.rrd':'traffic_in':LAST
DEF:b='/var/www/html/cacti/rra/1nete-ne20e-s1_traffic_in_2570.rrd':'traffic_in':LAST
DEF:c='/var/www/html/cacti/rra/1nete-ne20e-s1_traffic_in_2562.rrd':'traffic_out':LAST
DEF:d='/var/www/html/cacti/rra/1nete-ne20e-s1_traffic_in_2570.rrd':'traffic_out':LAST
CDEF:cdefa='a,8,'
CDEF:cdefe='b,8,
'
CDEF:cdefi='c,8,'
CDEF:cdefbc='d,8,
'
CDEF:cdefbj='TIME,1710806271,GT,a,a,UN,0,a,IF,IF,TIME,1710806271,GT,b,b,UN,0,b,IF,IF,+,8,'
CDEF:cdefce='TIME,1710806271,GT,c,c,UN,0,c,IF,IF,TIME,1710806271,GT,d,d,UN,0,d,IF,IF,+,8,
'
AREA:cdefa#00CF007F:'1NETE-NE20E-S1'
GPRINT:cdefa:LAST:'Current:%8.2lf %s'
GPRINT:cdefa:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefa:MAX:'Maximum:%8.2lf %s\n'
AREA:cdefe#00CF007F:'1NETE-NE20E-S1':STACK
GPRINT:cdefe:LAST:'Current:%8.2lf %s'
GPRINT:cdefe:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefe:MAX:'Maximum:%8.2lf %s\n'
AREA:cdefi#002A97FF:'1NETE-NE20E-S1'
GPRINT:cdefi:LAST:'Current:%8.2lf %s'
GPRINT:cdefi:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefi:MAX:'Maximum:%8.2lf %s\n'
AREA:cdefbc#002A97FF:'1NETE-NE20E-S1':STACK
GPRINT:cdefbc:LAST:'Current:%8.2lf %s'
GPRINT:cdefbc:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefbc:MAX:'Maximum:%8.2lf %s\n'
COMMENT:' \n'
COMMENT:' \n'
COMMENT:' \n'
LINE1:cdefbj#00CF00FF:
LINE1:cdefbj#00CF007F:'Total '
GPRINT:cdefbj:LAST:'Current:%8.2lf %s'
GPRINT:cdefbj:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefbj:MAX:'Maximum:%8.2lf %s\n'
LINE1:cdefce#002A97FF:
LINE1:cdefce#002A977F:'Total '
GPRINT:cdefce:LAST:'Current:%8.2lf %s'
GPRINT:cdefce:AVERAGE:'Average:%8.2lf %s'
GPRINT:cdefce:MAX:'Maximum:%8.2lf %s\n'
COMMENT:' \n'
HRULE:711157442.95#FF0000FF:'95th Percentile'
COMMENT:'(711.16 mbit in+out)'

RRDtool Command lengths = 2253 characters.
RRDtool Says:
OK
`

@iskandarbasman iskandarbasman added bug Undesired behaviour unverified Some days we don't have a clue labels Mar 19, 2024
@aliuzzz
Copy link
Contributor

aliuzzz commented Mar 19, 2024

1.2.26 is ok

@iskandarbasman
Copy link
Author

iskandarbasman commented Mar 20, 2024

I saw there was a major bug fix aggregate graphs and percentiles for 1.2.26.
So far trying it out has been positive (95th percentile value is more accurate) but its seems i have to recreate the aggregate graphs for it to use this new N-th percentile template ?

Old Graph
image

New Graph
image

@TheWitness
Copy link
Member

We will table this discussion for 1.2.27. We will restart the conversation after release.

@TheWitness TheWitness added the confirmed Bug is confirm by dev team label Apr 5, 2024
@TheWitness TheWitness added this to the v1.3.0 milestone Apr 5, 2024
@TheWitness TheWitness added aggregate Aggregate related issue enhancement General tag for an enhancement and removed unverified Some days we don't have a clue bug Undesired behaviour labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aggregate Aggregate related issue confirmed Bug is confirm by dev team enhancement General tag for an enhancement
Projects
None yet
Development

No branches or pull requests

3 participants