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

Dashboards: Comparing with Multiple Fields Results in Identical Field Names in Comparison Output #11

Closed
leo-6C656F opened this issue Oct 2, 2024 · 10 comments

Comments

@leo-6C656F
Copy link

What happened?

When performing a comparison query with more than one field, the resulting field names in the comparison query output are look to be incorrect.

  1. The time field retains its correct name and is properly suffixed as expected in comparison results.
  2. For all other fields, the comparison query applies the field name from the first column to subsequent columns.
image image

What did you expect to happen?

Each field should properly map with he correct suffix.

Did this work before?

No

How do we reproduce it?

  1. Create query with more than one field, ex. time, transaction, dollar_amount
  2. Start Comparison Query

Environment (with versions)?

Grafana: v11.2.0 (c57667e448)

Grafana platform?

Docker

@leo-6C656F leo-6C656F changed the title Dashboards: Comparing with multiple fields results in the comparison results having the same field name Dashboards: Comparing with Multiple Fields Results in Identical Field Names in Comparison Output Oct 2, 2024
@leoswing
Copy link
Owner

@leo-6C656F Hi , Could you please help to provide the full detail snapshots ? As I use in the Grafana 11.2.2, it works fine.

Environment (with versions)
Grafana: v11.2.2

Plugin version:
2.0.2

image

@leoswing
Copy link
Owner

@leo-6C656F Hi leo, is there any problem about this issue? If no, I will close this in a few days ~

@beyzacevik
Copy link

beyzacevik commented Nov 13, 2024

Hello,

@leoswing Thank you for your contribution.

I think it is also a problem for grafana 11.3.. There are some buggy situations in naming of the variables.

E.g 1: Even though I use the absolute prefix it does adds the '2' to the end of the variable.
Screenshot 2024-11-13 134353

E.g 2: Although the functionality is correct on my implementation on board. The variable naming is not working correctly. It raises the below error:

Screenshot 2024-11-13 134611
Screenshot 2024-11-13 134638
Screenshot 2024-11-13 135207

Note: I am 100% sure of the reason for the second problem. I can create another issue if required.

Thanks

@leoswing
Copy link
Owner

leoswing commented Nov 13, 2024

@beyzacevik Hi, I've been using the plugin under Grafana 11.2.2 with plugin version 2.0.2, I will check how it's performed in Grafana 11.3.0.

May I know which version of plugin is using in your production?

@beyzacevik
Copy link

@leoswing

Here are the versions for reproduction:

Grafana: Grafana v11.3.0-pre (unknown-de)
CompareQueries: leoswing-comparequeries-datasource-2.0.2

@leoswing
Copy link
Owner

leoswing commented Nov 18, 2024

@leoswing

Here are the versions for reproduction:

Grafana: Grafana v11.3.0-pre (unknown-de) CompareQueries: leoswing-comparequeries-datasource-2.0.2

截屏2024-11-18 16 58 42

@beyzacevik Hi, I just tested in Grafana 11.3.0 release version with plugin 2.0.2, and it just works fine.

And my database is ElasticSearch, the field name in comparison result works as expect.

Do you mean using the absolute mode as below?
截屏2024-11-18 17 07 44

@leoswing
Copy link
Owner

leoswing commented Nov 18, 2024

@beyzacevik The second issue which raise error does not comes from this plugin.
And meanwhile the first naming field issue just caused under absolute mode. After debug found that this may due to Grafana 11 may using the absolute value as the default one, so when it's named as the same, it would produce the 2 in the absolute mode.

@leo-6C656F @beyzacevik Under absolute alias mode, the main cause is as below:
截屏2024-11-18 18 52 17

@leoswing
Copy link
Owner

@leo-6C656F @beyzacevik Hi, I've fixed this, and submit a new version submission, now waiting for grafana reviews. Thanks for you using this plugin~

And welcome to star ~

@beyzacevik
Copy link

@leoswing Hello, thank you so much for the care for this issue. I will try it out with the new version. Also, I realized that the first issue was related to elasticsearch plugin permissions.

@leoswing
Copy link
Owner

@leo-6C656F @beyzacevik Hi guys, plugin version 2.0.3 is released which fix the field name display issue, and works well.

Could you please update and use the latest version 2.0.3 for the plugin? Thanks for your reporting.

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

No branches or pull requests

3 participants