Open Vitaliy155 opened 5 months ago
Same issue - I have used stream selectors forever to filter logs from labels with variables dynamically, and they seem to get blanked out in the UI when saved - and ignored altogether when filtering additional nested variables.
I have been using this since Loki was released:
label_values(compose_project)
service
label_values({compose_project=~"$project"}, compose_service)
container
label_values({compose_project=~"$project", compose_service=~"$service"}, container_name)
host
label_values({compose_service=~"$service", container_name=~"$container"}, host)
This Bug basicly breaks chained variables when using loki as a datasouce :(
We are stuck to Grafana 11.0.0 because of this issue. I have tried to upgrade to any newer versions (11.1 or 11.2) and it breaks dashboard chained variables every time.
Describe the bug Grafana dashboard variable works incorrect where variable definition as {$label_name=~"$label_value"}
To Reproduce
Create 3 variables in the Grafana dashboard: label_name - Query type: Label names; label_value - Query type: Label values, Label: {$label_name}; loglevel - Query type: Label values, Label: loglevel, stream selector: {$label_name=~“$label_value”}
Save and go to dashboard.
Choose Label name:host, Label value:, level: one of the available levels. In my case it's ERROR.
There is no level ERROR ... but should be!
Expected behavior Should be available value from custom variables related to label_value. As workaround, you can see label_value: "ERROR" without custom variable if choose: label_name: "loglevel" and label_value: "ERROR"
Environment: Grafana: 10.4.3 Loki:3.0.0
Screenshots, Promtail config, or terminal output