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

passing query through grafana variable doesn't work anymore #77

Open
jenneron opened this issue Sep 18, 2024 · 1 comment
Open

passing query through grafana variable doesn't work anymore #77

jenneron opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working waiting for release

Comments

@jenneron
Copy link

Our use case is to restrict table with some label, but also provide an option to append another query or search field from user input.

For example, we can match _AUDIT_LOGINUID:* *

screenshot

image

But we can't set $query to * and match _AUDIT_LOGINUID:* $query:

screenshot

image

I believe this is due to escape characters in resulting expression: expr:"_AUDIT_LOGINUID:* \"*\""

While this might be sufficient to provide a search field, it makes a wrong expression when the variable is empty: expr:"_AUDIT_LOGINUID:* \"\""

It works when downgrading the plugin to 0.3.0:

screenshot

image

The resulting query with 0.3.0: expr:"_AUDIT_LOGINUID:* *"

The resulting query with 0.3.0 and empty variable: expr:"_AUDIT_LOGINUID:* "

@Loori-R Loori-R self-assigned this Sep 18, 2024
@Loori-R Loori-R added the bug Something isn't working label Sep 18, 2024
@skoppe
Copy link

skoppe commented Sep 27, 2024

Our use case is to restrict table with some label, but also provide an option to append another query or search field from user input.

Same here. Couldn't get it to work, good its a known issue.

BTW, victorialogs and this datasource are amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for release
Projects
None yet
Development

No branches or pull requests

4 participants