increase() returns decimal numbers?

1,690 views
Skip to first unread message

stefan...@gmail.com

unread,
Dec 29, 2016, 9:57:52 AM12/29/16
to Prometheus Users

Hi,


I have setup a jmx_exporter (awesome work!) and started to analyze JVM metrics for a project I'm working on.


I wanted to have a metric that counts the # of GC events over the last 30 secs. To do that, I used the increase function.


However, as you can see below, I got a decimal number (3.59 for ParNew), when actually in the interval there have been 3 GC events.


Why is that?


Brian Brazil

unread,
Dec 29, 2016, 10:43:05 AM12/29/16
to stefan...@gmail.com, Prometheus Users
The data shows that in 25 seconds there were 3 GC events. You asked for the GC events over 30 seconds, so 3/25*30 = 3.6.

Brian
 


Why is that?


--
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/3c2ab128-6d57-408d-bce3-3ff59637f40e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Stefano Doni

unread,
Jan 13, 2017, 6:26:18 AM1/13/17
to Prometheus Users, stefan...@gmail.com
Thanks Brian,

now I get it.


However, I would like to have the counts of GC since the last polling interval. Something similar to what irate does vs rate or idelta vs delta for gauges, but I don't see "iincrease" in the current query functions?

On Thursday, 29 December 2016 16:43:05 UTC+1, Brian Brazil wrote:
On 29 December 2016 at 14:57, <stefan...@gmail.com> wrote:

Hi,


I have setup a jmx_exporter (awesome work!) and started to analyze JVM metrics for a project I'm working on.


I wanted to have a metric that counts the # of GC events over the last 30 secs. To do that, I used the increase function.


However, as you can see below, I got a decimal number (3.59 for ParNew), when actually in the interval there have been 3 GC events.

The data shows that in 25 seconds there were 3 GC events. You asked for the GC events over 30 seconds, so 3/25*30 = 3.6.

Brian
 


Why is that?


--
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.



--

Brian Brazil

unread,
Jan 13, 2017, 7:20:57 AM1/13/17
to Stefano Doni, Prometheus Users
On 13 January 2017 at 11:26, Stefano Doni <stefan...@gmail.com> wrote:
Thanks Brian,

now I get it.


However, I would like to have the counts of GC since the last polling interval. Something similar to what irate does vs rate or idelta vs delta for gauges, but I don't see "iincrease" in the current query functions?

That is idelta, which you should only be using if you're doing pretty advanced stuff (and partially depends on a feature that hasn't been implemented yet).

A rate on the _count is probably what you're looking for.

Brian 

On Thursday, 29 December 2016 16:43:05 UTC+1, Brian Brazil wrote:
On 29 December 2016 at 14:57, <stefan...@gmail.com> wrote:

Hi,


I have setup a jmx_exporter (awesome work!) and started to analyze JVM metrics for a project I'm working on.


I wanted to have a metric that counts the # of GC events over the last 30 secs. To do that, I used the increase function.


However, as you can see below, I got a decimal number (3.59 for ParNew), when actually in the interval there have been 3 GC events.

The data shows that in 25 seconds there were 3 GC events. You asked for the GC events over 30 seconds, so 3/25*30 = 3.6.

Brian
 


Why is that?


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3c2ab128-6d57-408d-bce3-3ff59637f40e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

--
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/5b77602b-29cb-49d2-a3b7-aed9f22a0134%40googlegroups.com.

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



--
Reply all
Reply to author
Forward
0 new messages