How to get the count or sum by hour in day or daywise in a month from PromQL in Grafana

14 views
Skip to first unread message

Rajesh Reddy Nachireddi

unread,
May 19, 2020, 3:07:22 AM5/19/20
to Brian Candler, Prometheus Users, Julius Volz
Hi,

How to get the count or sum by hour in day or daywise in a month from PromQL in Grafana ?

we want to get the following:

1. when we select daily report -
ex: on Monday
12 AM to 1AM - 100
1AM - 2AM - 200
2AM - 3AM - 400
....

on tuesday
12 AM to 1AM - 100
1AM - 2AM - 200
2AM - 3AM - 400
....

similarly for monthly reports

Jan
1/1 - 100
1/2 - 300
1/3 -0
1/4 -234
..
1/31 - 456

Please suggest a way to get these kind of reports using recording rules or promql instead of external scripts.

Thanks,

Rajesh

    
Reply all
Reply to author
Forward
0 new messages