How to do the aggregation (hourly, daily) for the gauge metrics in prometheus #13541
BrivinTech
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am storing the gauge metrics (storing the PM data for every 15 mins and those PM data are reset before collecting for next 15 min cycle)
For example, active_users metric will have the value at 10:00 is 50, at 10:15 is 25..
the retention period for these data is 1 year. In one of my use case, I want to render the chart, which should show the date for everey 1 hour or daily. How to do the aggregation query like this in the prometheus.
I am aware that, using api/v1/query API of active_users[30d:1h] will return the data for every 1h for the last 30 days. but here, prometheus doing average of 4 15-min data and mapping to 1h. but for gauge metrics, i want to do the sum of 4 15-min data. Is there any way to do this in the prometheus.? Please help on this.
Prometheus version
2.14.0
Beta Was this translation helpful? Give feedback.
All reactions