pyrra
pyrra copied to clipboard
feat add Grafana explorer integration with pyrra UI
Hi guys recently we start to use pyrra, with grafana mimir .
It possible configure prometheusExternalUrl to use grafana explorer instead of the prometheus dashboard for see queries directly in grafana?
I guess you could theoretically set the URL to Grafana Explore, I'm pretty sure the URL's query params are quite different. We would need to figure out some sort of standard Grafana Explore has to be able to properly build the URL.
May be the Grafana SDK has some methods to build the URL properly. We could make a bit of research on this regard
you can do this
https://grafana.foobar.com/explore?orgId=1&left={"datasource":"AbfTenkVk","queries":[{"expr":"vector(1)"}]}
You'd need a way to pass in orgId
and datasource
Without datasource it'll use the default or whatever you selected last to explore from.
I'm happy to attempt a PR if people are ok with passing those in. Not sure of another way to make grafana be an external link to the data though
you can do this
https://grafana.foobar.com/explore?orgId=1&left={"datasource":"AbfTenkVk","queries":[{"expr":"vector(1)"}]}
You'd need a way to pass in
orgId
anddatasource
Without datasource it'll use the default or whatever you selected last to explore from.
I'm happy to attempt a PR if people are ok with passing those in. Not sure of another way to make grafana be an external link to the data though
I think for that you need to capture those variables by using flags. IMHO they could be something like:
--is-grafana-gui (or something similar)
--grafana-organization-id
--grafana-datasource
Sounds like something we can explore, yes. 👍 I wonder, do you think the Prometheus external links should still show too, or would this replace those with opening in Grafana entirely?
@metalmatze i would vote to to have the text mention grafana if you pass in the args to turn the link into a grafana link if that's the way to handle grafana links
Ok, sounds good to me! 👌
Ok, sounds good to me! 👌
to me too. It makes sense 🙂
Any updates here? We expose a central grafana that aggregates hundreds of prometheus instances, and do not expose Prometheus. This would be a great way to connect the two systems.