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

graph fields get (semi) randomized ordering #1562

Open
niclan opened this issue Jul 25, 2023 · 5 comments
Open

graph fields get (semi) randomized ordering #1562

niclan opened this issue Jul 25, 2023 · 5 comments

Comments

@niclan
Copy link
Contributor

niclan commented Jul 25, 2023

Describe the bug

This is with git master from this morning.

The graph fields get (semi) randomized ordering. This results in different colors for each field in the graph too. This can be seen clearly in this screenshot:

image

Expected behavior

The behavior in version 2 and earlier was

  1. Preserve the order the plugin gives the fields in
  2. Allow (selective) ordering override with graph_order. Graph_order does not need to enumerate all the fields, so the fields not enumerated must retain the ordering from 1.

I'll have a looksee to find a array with the plugin given order preserved.

@niclan
Copy link
Contributor Author

niclan commented Jul 25, 2023

OK so as of perl 5.18 keys actively randomizes the key ordering so all three calls to "keys" inside https://github.com/munin-monitoring/munin/blob/master/lib/Munin/Master/Graph.pm#L323 shuffels the ordering.

@niclan
Copy link
Contributor Author

niclan commented Jul 25, 2023

This (provisional) PR makes the perl deterministic: #1563 but the field order is still jumbled up.

image

To graph correctly the order given by the "config" (not "fetch") output must be preserved:

multigraph mysql_commands
graph_args --base 1000 --no-gridfit --slope-mode
graph_title Command Counters
graph_vlabel Commands per ${graph_period}
graph_total Questions
graph_category mysql
Com_delete.draw AREASTACK
Com_delete.colour FF7D00
Com_delete.min 0
Com_delete.label Delete
Com_delete.type DERIVE
Com_delete_multi.draw AREASTACK
Com_delete_multi.colour 942D0C
Com_delete_multi.min 0
Com_delete_multi.label Delete multi
Com_delete_multi.type DERIVE
Com_insert.draw AREASTACK
Com_insert.colour FFF200
Com_insert.min 0
Com_insert.label Insert
Com_insert.type DERIVE
Com_insert_select.draw AREASTACK
Com_insert_select.colour AAABA1
Com_insert_select.min 0
Com_insert_select.label Insert select
Com_insert_select.type DERIVE
Com_load.draw AREASTACK
Com_load.colour 55009D
Com_load.min 0
Com_load.label Load Data
Com_load.type DERIVE
Com_replace.draw AREASTACK
Com_replace.colour 2175D9
Com_replace.min 0
Com_replace.label Replace
Com_replace.type DERIVE
Com_replace_select.draw AREASTACK
Com_replace_select.colour 00B99B
Com_replace_select.min 0
Com_replace_select.label Replace select
Com_replace_select.type DERIVE
Com_select.draw AREASTACK
Com_select.colour FF0000
Com_select.min 0
Com_select.label Select
Com_select.type DERIVE
Com_update.draw AREASTACK
Com_update.colour 00CF00
Com_update.min 0
Com_update.label Update
Com_update.type DERIVE
Com_update_multi.draw AREASTACK
Com_update_multi.colour D8ACE0
Com_update_multi.min 0
Com_update_multi.label Update multi
Com_update_multi.type DERIVE

@niclan niclan closed this as completed Jul 25, 2023
@niclan
Copy link
Contributor Author

niclan commented Jul 25, 2023

There are still variations in color sequence which leads me to believe that the .color attribute is not retrieved correctly as well :-( Actually a superficial inspections makes it seem like the graph is using the system palette.

@niclan niclan reopened this Jul 25, 2023
@steveschnepp
Copy link
Member

This indeed looks like a bug. As we should reuse the graph_order order first and then config plugin order for those not defined there.

@steveschnepp
Copy link
Member

Hmmm.. if still not working on master it seems that #1551 was not enough 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants