-
Notifications
You must be signed in to change notification settings - Fork 461
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
ruler: support explore URL format in the GeneratorURL #2997
Comments
You raised a very good point, and I agree with you that the Mimir ruler should be able to generate URLs which work with Grafana. However, I'm wondering if we should integrate it with Grafana Alerting, instead of the Grafana explore, but I don't have any concern supporting Grafana explore too (or begin just supporting Grafana explore). Few comments about your proposal:
|
Right, linking to Grafana Alerting would probably make sense too, but I don't have much experience with that yet so I'm not able to suggest how that would work. Regarding your comments on the proposal, both sound reasonable and make the configuration clearer, so 👍. Regarding the datasource, if you set |
We eventually ended up running just the React part of Prometheus UI pointing to a Mimir API, and it works really well and easy to make and solves the issue for us in combination with the injection of tenant ID in the alert template. But if we agree the way to do this, I'd be happy to implement it |
We do this in a Lambda (which is fed JSON-formatted alerts from Alertmanager via SNS). Here's the relevant Python code. Not perfect, but it mostly works for us. Hope it's helpful to someone.
|
In theory, it could be an additional template function since it is quite easy to add it after changes being made in #3758 Something like That would leave the |
I like the idea of a custom function. We can still leave the door open to properly fix |
Ok, I'll create new PR with the agreed function. Thanks @Packetslave, your example will make it easier and hopefully this will make it easier for you also. |
Here, as promised #3849 |
Closed by #3849. |
Yes, closing as done 🎉 |
From original discussion on slack
Current state
In Prometheus, an alert does have a
GeneratorURL
which points to the graph view of the particular Prometheus which sent it, with the query from the alert already filled in.With Mimir ruler this is possible the same way:
Currently, ruler allows configuring the
external_url
and then it generates theGeneratorURL
using the Prometheus code which means appending/graph?g0.expr=%s&g0.tab=0
to theexternal_url
.Problem
The issue is that Mimir does not have the Prometheus compatible UI, so there is nowhere to point the URL to.
Naturally, I'd expect this to be compatible with the Grafana explore since that is the native UI for querying Mimir, but it appears not.
Suggestion
Add probably 2 new configuration options to the ruler something like
Workaround
I found quite easy running only Prometheus react UI pointing to a Mimir. This way I'm capable of doing an "adapter" to make the URL work (and as a side effect give users the classic Prometheus UI which would ease the Migration for them)
If agreed on the solution, I'd be happy to implement it :)
The text was updated successfully, but these errors were encountered: