Hi there
In most of my dashboards I’ve a bunch of variables to filter bit by bit the scope : owner, then environment, then service, then instance. It works like a charm on prometheus variables. When using Loki as a datasource for the variable, the subsequent variable values aren’t filtered as I expect them to be. Is it me doing it wrong, or is there a bug ?
To illustrate, here is the variable edition with a Loki stream selector (if I can call it like that). Tons of instances, not filtered
Then I switch it to prometheus, only the relevant instances are shown
Using prometheus is a partial workaround, but it won’t do for every field, it’s not aware of the loki’s systemd unit name for example, and this filter is dearly needed too.
Did you ever found a solution for this? I’m facing the same issue and its a show stopper
me too, I’m facing the same issue, is there any update for this?
There is a poll request to fix the issue but hasn’t been merge
grafana:master
← secustor:implement_subqueries
opened 11:01PM - 12 Jan 21 UTC
<!--
Thank you for sending a pull request! Here are some tips:
1. If this … is your first time, please read our contribution guide at https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md
2. Ensure you include and run the appropriate tests as part of your Pull Request.
3. In a new feature or configuration option, an update to the documentation is necessary. Everything related to the documentation is under the docs folder in the root of the repository.
4. If the Pull Request is a work in progress, make use of GitHub's "Draft PR" feature and mark it as such.
5. If you can not merge your Pull Request due to a merge conflict, Rebase it. This gets it in sync with the master branch.
6. Name your PR as "<FeatureArea>: Describe your change", e.g. Alerting: Prevent race condition. If it's a fix or feature relevant for the changelog describe the user impact in the title. The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label.
-->
**What this PR does / why we need it**:
At the moment it is not possible to run nested queries in Grafana variables for Loki
e.g. `label_values({compose_service=~$service, compose_project=~$project}, container_name)`
**Which issue(s) this PR fixes**:
<!--
- Automatically closes linked issue when the Pull Request is merged.
Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
-->
Fixes #25205
**Special notes for your reviewer**:
I need some direction regarding topics like:
- how to get specific data like the other defined variables for later interpolation
- do I need a start time if the range has been provided as both are required
- the same goes for `interval` and `intervalMs`
I read somewhere that you could set your Loki datasource as a Prometheus one on a specific endpoint and it would work but I cant find exactly how.