Delta only for gauges?

2,302 views
Skip to first unread message

ili...@luminatewireless.com

unread,
Apr 5, 2017, 7:54:15 PM4/5/17
to Prometheus Users
Hi there,


According to the documentation on the website, the delta function should only be used with gauges. Why can't it be used with counters? I was hoping to use delta as a way to get a counter's true increase since it seems to account for counter resets.

Ilina

ili...@luminatewireless.com

unread,
Apr 5, 2017, 7:57:08 PM4/5/17
to Prometheus Users, ili...@luminatewireless.com
Oh never mind... looks like I should just use the increase function, right?

Julius Volz

unread,
Apr 6, 2017, 9:42:04 AM4/6/17
to Ilina Mitra, Prometheus Users
Correct. rate(), irate(), and increase() deal correctly with counter resets, so they are the functions to use for counters (which can only go up besides resets, and you never care about their value itself, only the increase).

delta() and deriv() are for gauges, as they don't interpret non-monotonically increasing values as resets. So you can see e.g. how much a temperature has changed in the last 1h, or see how disk usage is trending.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b138e11b-7d6d-4a84-b9e6-3f262ac7da88%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

joshua_m...@homedepot.com

unread,
Feb 8, 2019, 1:51:29 PM2/8/19
to Prometheus Users
How would I go about taking the delta() or an increase()?


On Thursday, April 6, 2017 at 9:42:04 AM UTC-4, Julius Volz wrote:
Correct. rate(), irate(), and increase() deal correctly with counter resets, so they are the functions to use for counters (which can only go up besides resets, and you never care about their value itself, only the increase).

delta() and deriv() are for gauges, as they don't interpret non-monotonically increasing values as resets. So you can see e.g. how much a temperature has changed in the last 1h, or see how disk usage is trending.
On Thu, Apr 6, 2017 at 1:57 AM, <ili...@luminatewireless.com> wrote:
Oh never mind... looks like I should just use the increase function, right?

On Wednesday, April 5, 2017 at 4:54:15 PM UTC-7, ili...@luminatewireless.com wrote:
Hi there,


According to the documentation on the website, the delta function should only be used with gauges. Why can't it be used with counters? I was hoping to use delta as a way to get a counter's true increase since it seems to account for counter resets.

Ilina

--
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 post to this group, send email to promethe...@googlegroups.com.

joshua_m...@homedepot.com

unread,
Feb 8, 2019, 1:52:03 PM2/8/19
to Prometheus Users
delta() of** and increase()

joshua_m...@homedepot.com

unread,
Feb 8, 2019, 1:52:33 PM2/8/19
to Prometheus Users
delta() of an*** increase() - my goodness I cannot type
Reply all
Reply to author
Forward
0 new messages