admin管理员组

文章数量:1123712

When using the irate function against a counter like so: irate(subtract_server_credits[$__rate_interval]) * 60 I'm receiving the expected result for the second set of data (pictured below in green). The reason for the gap is a container restart leaving some time where the target was being restarted.

The problem is that the data on the left (yellow) is appearing as a 0 vector.

When I use rate instead (rate(subtract_server_credits[$__rate_interval]) * 60) I get data appearing in the left and right datasets, but there's a lead time before the graph shows the data leveling to the correct values. In both instances the data is supposed to be constant, there shouldn't be a ramp up time as pictured below. This makes sense because the rate function takes into account the value before it and if there isn't a value before it it'll take a few datapoints before it smooths out.

Is there a way to use irate to achieve the same effect I'm seeing in the first graph in green but across both datasets?

本文标签: grafanaPrometheus irate function gives 0 result after breaks in monotonicityStack Overflow