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

Error while using multiple variable in Grafana #84838

Closed
DemPago opened this issue Mar 20, 2024 · 7 comments
Closed

Error while using multiple variable in Grafana #84838

DemPago opened this issue Mar 20, 2024 · 7 comments
Assignees
Labels

Comments

@DemPago
Copy link

DemPago commented Mar 20, 2024

What happened?

"When using Grafana, I am making a JQL query on Azure Monitor as a data source, and when I select 'multi-value,' the query does not return any values."
This is the query:
| where Nome_ente contains ("$Name") or "$Name" contains_cs "All"

Here the date about Name
$Name is a query variable.
image

It's something wrong?

What did you expect to happen?

"I would like to visualize a multi-value query."

Did this work before?

Never

How do we reproduce it?

  1. Use Azure Monitor as Data Source
    2.| use a query like this where Nome_ente contains ("$Name") or "$Name" contains_cs "All"

  2. Set multi value on the variable

Is the bug inside a dashboard panel?

no

Environment (with versions)?

Grafana: ver 10
OS: Mac OS Sonoma
Browser: Chrome

Grafana platform?

I use Grafana Cloud

Datasource(s)?

Azure Monitor

@aangelisc
Copy link
Contributor

Hi @DemPago, thank you for opening this issue. To confirm:

  • Do you see data when selecting a single value for the multi-value template variable?
  • Do you see data when you select the All option?

@DemPago
Copy link
Author

DemPago commented Apr 17, 2024 via email

@bossinc
Copy link
Contributor

bossinc commented May 6, 2024

@DemPago The contains operator does not work with a list of values. https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/contains-operator

I think you are looking for the in operator. https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/in-cs-operator

@DemPago
Copy link
Author

DemPago commented May 8, 2024 via email

@bossinc
Copy link
Contributor

bossinc commented May 14, 2024

@DemPago What do you expect the query to look like after executing the template variables?

| where Nome_ente contains ("name1", "name2") is not valid KQL. contains expects only 1 value.

@bossinc bossinc self-assigned this May 14, 2024
@bossinc
Copy link
Contributor

bossinc commented May 29, 2024

I am closing this issue for now. Let me know if you have more questions or if this wasn't resolved.

@bossinc bossinc closed this as completed May 29, 2024
@DemPago
Copy link
Author

DemPago commented May 29, 2024 via email

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

No branches or pull requests

4 participants