Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.65k stars 406 forks source link

Aggregate graph does not show other percentiles #5555

Closed DFlexy closed 12 months ago

DFlexy commented 1 year ago

I have a graph template that is applied to all graphs and aggregates, however when I create the normal graphs I can see the 95th and 99th ones but in the aggregates I cannot see this data as shown in the screenshots below

Normal graph image

Agregate graph image

Here model graph for aggregate image

TheWitness commented 1 year ago

Yea, I'm grumbling about this. The it can be included, but the logic is tricky. It only works in a few cases, specifically when you are totaling all data sources.

TheWitness commented 1 year ago

So, update lib/api_aggregate.php from the 1.2.x branch and then resave the Aggregate Template. Let me know how it goes. It should fix it.

TheWitness commented 1 year ago

I did one minor QA to also handle the hrules as well.

DFlexy commented 1 year ago

Hello, I made the adjustments to the lines and nothing, then I replaced the file and nothing. I'm putting the debugs of the aggregated graphs with the problem and the debug of a simple graph working, remembering that they both use the same template

Version 1.2.25

image

Debug here RRDtool Command: /usr/bin/rrdtool graph - \ --imgformat=SVG \ --start='-86400' \ --end='-300' \ --pango-markup \ --title='OTHERS' \ --vertical-label='bits por segundo' \ --slope-mode \ --base=1000 \ --height=150 \ --width=700 \ --alt-autoscale \ COMMENT:"From 19-11-2023 08\:43\:04 To 20-11-2023 08\:38\:04\c" \ COMMENT:" \n" \ --color BACK#F3F3F3 \ --color CANVAS#FDFDFD \ --color SHADEA#CBCBCB \ --color SHADEB#999999 \ --color FONT#000000 \ --color AXIS#2C4D43 \ --color ARROW#2C4D43 \ --color FRAME#2C4D43 \ --border 1 \ --font TITLE:9: \ --font AXIS:8: \ --font LEGEND:9: \ --font UNIT:8: \ --font WATERMARK:8: \ --slope-mode \ --watermark 'Por ' \ DEF:a='/usr/share/cacti/rra/10_10_10_10_traffic_in_1148.rrd':'traffic_in':AVERAGE \ DEF:b='/usr/share/cacti/rra/10_10_10_10_traffic_in_1148.rrd':'traffic_out':AVERAGE \ DEF:c='/usr/share/cacti/rra/10_10_10_10_traffic_in_1238.rrd':'traffic_in':AVERAGE \ DEF:d='/usr/share/cacti/rra/10_10_10_10_traffic_in_1238.rrd':'traffic_out':AVERAGE \ CDEF:cdefa='a,0,*' \ CDEF:cdefb='b,0,*' \ CDEF:cdefc='c,0,*' \ CDEF:cdefd='d,0,*' \ CDEF:cdefe='TIME,1700480284,GT,a,a,UN,0,a,IF,IF,TIME,1700480284,GT,c,c,UN,0,c,IF,IF,+,8,*' \ CDEF:cdefi='TIME,1700480284,GT,b,b,UN,0,b,IF,IF,TIME,1700480284,GT,d,d,UN,0,d,IF,IF,+,8,*' \ AREA:cdefa#306EFF7F: \ AREA:cdefb#E8A3177F: \ AREA:cdefc#306EFF7F: \ AREA:cdefd#E8A3177F: \ AREA:cdefe#306EFF7F:'Total Inbound ' \ GPRINT:cdefe:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefe:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefe:MAX:'Maximum\:%8.2lf %s\n' \ AREA:cdefi#E8A3177F:'Total Outbound' \ GPRINT:cdefi:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefi:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefi:MAX:'Maximum\:%8.2lf %s\n' \ COMMENT:' \n' \ HRULE:62026371223.2#800080FF:'99th Percentile In ->' RRDtool Command lengths = 1760 characters. RRDtool Says: SVG/XML Output OK

DFlexy commented 1 year ago

Simple graph here OK

image

Debug here RRDtool Command: /usr/bin/rrdtool graph - \ --imgformat=SVG \ --start='-86400' \ --end='-300' \ --pango-markup \ --title='10.10.10.10 / ae4.0 / 10000 / OTHER - 10G' \ --vertical-label='bits por segundo' \ --slope-mode \ --base=1000 \ --height=150 \ --width=700 \ --alt-autoscale \ COMMENT:"From 19-11-2023 08\:44\:44 To 20-11-2023 08\:39\:44\c" \ COMMENT:" \n" \ --color BACK#F3F3F3 \ --color CANVAS#FDFDFD \ --color SHADEA#CBCBCB \ --color SHADEB#999999 \ --color FONT#000000 \ --color AXIS#2C4D43 \ --color ARROW#2C4D43 \ --color FRAME#2C4D43 \ --border 1 \ --font TITLE:9: \ --font AXIS:8: \ --font LEGEND:9: \ --font UNIT:8: \ --font WATERMARK:8: \ --slope-mode \ --watermark 'Por ' \ DEF:a='/usr/share/cacti/rra/10_10_10_10_traffic_in_1355.rrd':'traffic_in':MAX \ DEF:b='/usr/share/cacti/rra/10_10_10_10_traffic_in_1355.rrd':'traffic_in':AVERAGE \ DEF:c='/usr/share/cacti/rra/10_10_10_10_traffic_in_1355.rrd':'traffic_out':MAX \ DEF:d='/usr/share/cacti/rra/10_10_10_10_traffic_in_1355.rrd':'traffic_out':AVERAGE \ CDEF:cdefa='a,8,*' \ CDEF:cdefb='b,8,*' \ CDEF:cdeff='c,8,*' \ CDEF:cdefg='d,8,*' \ LINE1:cdefa#306EFFFF: \ AREA:cdefb#306EFF7F:'Inbound ' \ GPRINT:cdefb:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefb:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefb:MAX:'Maximum\:%8.2lf %s\n' \ LINE1:cdeff#E8A317FF: \ AREA:cdefg#E8A3177F:'Outbound' \ GPRINT:cdefg:LAST:'Current\:%8.2lf %s' \ GPRINT:cdefg:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:cdefg:MAX:'Maximum\:%8.2lf %s\n' \ COMMENT:' \n' \ HRULE:269789501.16#000000FF:'95th Percentile In ->' \ COMMENT:'(269.79 mbit)' \ HRULE:463411527.58#800080FF:'99th Percentile In ->' \ COMMENT:'(463.41 mbit)\n' \ HRULE:269789501.16#E41B17FF:'95th Percentile Out ->' \ COMMENT:'(48.44 mbit)' \ HRULE:53565025.77#C04000FF:'99th Percentile Out ->' \ COMMENT:'(53.57 mbit)\n' RRDtool Command lengths = 1793 characters. RRDtool Says: SVG/XML Output OK

TheWitness commented 1 year ago

So, are you saying it's working on some aggregates and not others?

DFlexy commented 1 year ago

So, are you saying it's working on some aggregates and not others?

not only in simple graphs, aggregates do not work

TheWitness commented 1 year ago

Now I'm confused. Do you have any aggregates that after you resave either the aggregate or aggregate template that are working? Also, what happens when you create a new aggregate graph?

DFlexy commented 1 year ago

Now I'm confused. Do you have any aggregates that after you resave either the aggregate or aggregate template that are working? Also, what happens when you create a new aggregate graph?

I have an aggregation template that uses the same template as normal graphs, but normal graphs work and aggregates do not use the same template

DFlexy commented 1 year ago

Template agreggate after change bugged

image

template normal graph ok image

DFlexy commented 1 year ago

To create the aggregate I use the same graph template which is

image

DFlexy commented 1 year ago

ROLLBACK api_aggregate.php and see agregate template for info

image

TheWitness commented 1 year ago

Yea, that modified aggregate was a yikes moment. I'll dig in later today.

DFlexy commented 1 year ago

Yea, that modified aggregate was a yikes moment. I'll dig in later today.

I am very grateful for the help, this has been bothering me a lot because I need the percentiles of the aggregates. Thank you for the support

TheWitness commented 1 year ago

Can you please screen capture your Aggregate Template. I need the "Aggregate Template Settings" section. Thanks. I'm still finding the Aggregates a little buggy, though I was not able to reproduce your issue.

DFlexy commented 1 year ago

Can you please screen capture your Aggregate Template. I need the "Aggregate Template Settings" section. Thanks. I'm still finding the Aggregates a little buggy, though I was not able to reproduce your issue.

Here

image

DFlexy commented 1 year ago

Here Graph simple too if need image

TheWitness commented 1 year ago

Okay, tested on my side. I have a few updates to commit yet.

image

DFlexy commented 1 year ago

Okay, tested on my side. I have a few updates to commit yet.

image

You can place the IN and OUT separately in the aggregates like in the simple graphs because adding the in and out is wrong

TheWitness commented 1 year ago

Yea, you 'should' find that fixed in this latest update. Make sure you are pulling from the 1.2.x branch. 3 files this time.

DFlexy commented 1 year ago

I replaced the 3 files and now no percentile appears anymore

image

DFlexy commented 1 year ago

W8 create one new agregate i thing work moment

DFlexy commented 1 year ago

It didn't work for the old units But I created a new one and it worked, but only in the sense of IN

image

TheWitness commented 1 year ago

I think I may know what is happening. The confluence of items is coming from the member graphs, if the member graphs are not the Nth percentile graphs, then the aggregate will not be constructed properly. A bit of an oversight. I'll get to this later tonight if all goes well.

TheWitness commented 1 year ago

Okay, I just updated lib/api_aggregate.php. Remember to save your Aggregate Template again.

DFlexy commented 1 year ago

Okay, I just updated lib/api_aggregate.php. Remember to save your Aggregate Template again.

I changed the file and saved the aggregate template but it didn't work. I created another aggregate template to test and when I created an aggregate chart using the template it came in the same way only the IN

Here new graph with new model template image

image

TheWitness commented 1 year ago

Okay, I have it now... Committing in a few minutes. I did not see this before.

TheWitness commented 1 year ago

Okay, it should work now. Now that this is fixed, let's talk about what else is essentially broken... Give me more details, but do it in another ticket Okay?

TheWitness commented 1 year ago

Whoops, forgot to test before committing.

TheWitness commented 1 year ago

This looks way better now...

image

DFlexy commented 1 year ago

I can't access the aggregate option now in the template menu image

TheWitness commented 1 year ago

Grap a fresh copy. I have committed a typo.

DFlexy commented 1 year ago

The options worked but did not bring the values

image

TheWitness commented 1 year ago

Inch by inch ;)

TheWitness commented 1 year ago

Cross you fingers...

DFlexy commented 1 year ago

equal to the values of IN it's almost lol

image

TheWitness commented 1 year ago

Ugh. I'm seeing a few other issues as well. Still digging in.

TheWitness commented 1 year ago

Squeaking almost into new feature territory now. Assessing it. Have to check the underlying library.

TheWitness commented 1 year ago

Grab one more updated. Make sure you save your Aggregate Template again.

TheWitness commented 1 year ago

I'm going to have to put this code in a vault when done. Lot's of moving parts.

DFlexy commented 1 year ago

Nothing now

image

TheWitness commented 1 year ago

Okay, one more update. This updates: lib/graph_variables.php and lib/rrd.php

TheWitness commented 1 year ago

Sorry, there were not logged to this ticket.

DFlexy commented 1 year ago

Where are the files for me to get?

TheWitness commented 1 year ago

1.2.x branch.

TheWitness commented 1 year ago

https://github.com/Cacti/cacti/commit/914f187fbba89965cc7ab314dbe6ad0020eaa3ed

TheWitness commented 1 year ago

Crap missed one change. You have to re-save again. Sorry, long day.

DFlexy commented 1 year ago

I changed the 3 files and still no data and saved the template again

My time on the company's VPN is running out, I'll only be able to test it tomorrow

TheWitness commented 1 year ago

Okay, yea, it's broken for me too. Moving too fast. Jump back in tomorrow. We still have a few more days till release.

DFlexy commented 1 year ago

Okay, yea, it's broken for me too. Moving too fast. Jump back in tomorrow. We still have a few more days till release.

Thank you for the great support have a great day tomorrow we are back