Prometheus: Per hour statistics for a counter

Viewed 222

I have a counter, and I have to make a graph which shows per hour data I am trying to make use of increase function:

increase(my_metrics)[60m]

Is this the correct approach? Or some other better way of achieving this?

2 Answers

Yes, it seems to be the correct approach.

See more details of the "increase" function at the Prometheus documentation here.

Could put increase(my_metrics)[60m] to record rules, evaluat once every hour, to another metrics name like my_metrics_increases_houly. Then use table panel to display it, you will get exactly one point an hour.

Related