Grafana Variable Loki Label_Values for json parser created labels

So this seems like it should be simple but doesn’t appear to be.

I want to create a variable in Grafana using a label that is created using the json parser in Loki.

The VAST majority of our fields are detected fields to keep cardinality down in Loki. But when it comes to Grafana, these labels that are parsed out via json parser don’t seem usable.

I’d want to do something like label_values(({source=“CloudFlare”} | json),ZoneName)
and have it return the values of the ZoneName parsed label.

Hi @mdiorio

Unfortunately, you cannot use lablels created from any LogQL parser in Grafana label_values.

Internally, Grafana uses Loki’s /series endpoint to fetch list of time-series that matches a certain label set. (this behaviour is similar to prometheus HTTP API | Prometheus)

@mdiorio You found any alternate solution for the same, I am facing similar issue

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.