victorialogs-datasource
victorialogs-datasource copied to clipboard
passing query through grafana variable doesn't work anymore
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
But we can't set $query to *
and match _AUDIT_LOGINUID:* $query
:
screenshot
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
The resulting query with 0.3.0: expr:"_AUDIT_LOGINUID:* *"
The resulting query with 0.3.0 and empty variable: expr:"_AUDIT_LOGINUID:* "