StanislavBek
StanislavBek

Reputation: 35

Reference chosen time range (from, to) in Grafana's Promql query

I have a PromQL query max_over_time(some_metric_max[1h]) but instead of "1h" I would like to use the selected time range in Grafana. I can't find any variable for that (looking for something like $__interval, but for the selected range)...

Upvotes: 2

Views: 842

Answers (1)

Use:

max_over_time(some_metric_max[$__range])

See more details at Grafana documentation here.

Upvotes: 3

Related Questions