-
Notifications
You must be signed in to change notification settings - Fork 133
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
Grafana Label values variable does not work if filtered for a promxy-added label #665
Comments
…s to downstream If a label was only added by promxy *and* a matcher we'd still pass that matcher downstream. This is a problem as promxy is the one who added it -- so it doesn't matter if downstream knows about it (usually it doesn't). Fixes #665
First off; welcome and thanks for the report! This does indeed look like a bug! IIRC grafana used to not implement the So I have created #679 with a fix (and test!) for this case. If you want you can give that PR build a whirl; either way I'll likely merge this tomorrow (after I get some time to sit on the idea -- which seems fine, but just to be sure :) ). |
@jacksontj Thanks for fixing this. Unfortunately I could not test it, but will when a new release (and thus a new docker image) will be available. |
@SipSeb FYI I cut a new release recently which includes this fix: https://github.com/jacksontj/promxy/releases/tag/v0.0.88 |
@jacksontj I'm afraid I have to reopen it. (I can't, but I have to ask you to reopen it.) Looks better now, but only if I filter for just one promxy-added label, nothing else. In my setup, promxy adds two labels: Just one labelQuery string sent to promxy:
Query string passed on to prometheus servers:
Try adding another labelI only get the other promxy-added label in the dropdown, if I selected the But when I select the Query string sent to promxy:
Query string passed on:
The promsrc label should not be passed downstream. Using one promxy and one prometheus label as filterFor this, I had to first select the native prometheus label in Grafana and then the promxy-added label. But it does not return any results. Query string sent to promxy:
Query string sent downstream:
Can you take a look at this again, please? |
Thanks for the report (and I'm a bit surprised you can't re-open since you are the reporter; must be a setting I have to change). That aside; I was able to find and fix the issue (#684) if you want to give that PR build a spin. |
Thanks for the fix again. Much better now. But found another request, where it doesn't get filtered correctly. When adding more labels to a filter where I started with a promxy-added filter first, the dropdown is still empty (except for vars and promxy-added labels) - see my second screenshot in the last message. I can enter the desired label by hand and it will work afterwards, but it's probably not how it's supposed to be. Request string sent to promxy:
Request string passed on downstream:
Thanks for the efforts put in my report, I really appreciate it. |
Thanks for the quick response! I was able to find that issue and adjusted the patch (and added more test cases). So that should cover it. While double checking I also added support for |
Thanks! Looks good now from my first test. All issues reported above are resolved. Thank you very much. |
Hi,
we have Grafana running collecting data through promxy from multiple prometheus servers. Our setup looks like this:
Behind each dc1/euc1/beta target there are multiple prometheus servers. To distinguish the metrics, promxy adds two labels to each metric:
cluster
andpromsrc
. The first is filled with dev/test/prod and the latter with dc1/euc1/beta.We updated Grafana recently, to version 11.1.0. And with the update, a lot of dashboards stopped working. We first thought this is a Grafana bug (and reported it there), but apparently it is something with the labels added in promxy.
See these two examples.
From the logs, it looks like Grafana uses the
/api/v1/label/values
endpoint to gather the variable data. So to make it work, promxy would have to intercept the request, clean the added labels and then pass on the request, but only to those servers where the filter criteria matches.Is this something that is possible? Or is it impossible by design?
The text was updated successfully, but these errors were encountered: