promQL duration window

12 views
Skip to first unread message

M S

unread,
Mar 9, 2021, 3:46:26 AM3/9/21
to promethe...@googlegroups.com
How do I specify that I want see the last 1 hour of data only, or I want to see 2 days of data?

Charls P John

unread,
Mar 9, 2021, 5:24:26 AM3/9/21
to M S, Prometheus Users
Hi MS,

Did you try metric_name{label1="value1"}[1h] ?

On Tue, Mar 9, 2021, 14:16 'M S' via Prometheus Users <promethe...@googlegroups.com> wrote:
How do I specify that I want see the last 1 hour of data only, or I want to see 2 days of data?

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/D462A65B-689E-406E-877A-C5F3CA6BDD54%40yahoo.com.

M S

unread,
Mar 9, 2021, 5:34:42 AM3/9/21
to Charls P John, Prometheus Users
I believe [1h] in that context means use the data series of 1h intervals.

I wanted to specify the amount of time in the graph.

I did manage to do it — next to the data source, you can select query options, I set relative time to 7 days to get a week of data. 

Reply all
Reply to author
Forward
0 new messages