We use Grafana 8 together with Prometheus.
I created a dashboard and I use the automatically generated variable $__rate_interval all over the panels.
For visibility, in favor of other users of the dashboard, I would like to present the value that is assigned to this variable upon every refresh of the dashboard.
I couldn’t find any way for this small and should-be-easy requirement.
Could anyone suggest a way to do that?
Thank you very much
2 Likes
I am also looking for the answer to this exact question.
$__rate_interval
is only templated in prometheus data source, you can’t get it outside of the query. For a workaround, you could try making a panel with vector($__rate_interval)
query and displaying it at the top of the dashboard. Notice though that if you’re using time overrides, the $__rate_interval
value might (and most probably will) differ.
If the provided query doesn’t work (I’m not using prometheus directly), you can try setting the value of $__rate_interval
as a label: label_replace(time(), "interval", "$__rate_interval", "", "")
1 Like