Setting JMX Exporter Counter's initial value to 0

16 views
Skip to first unread message

In Park

unread,
Sep 23, 2020, 12:31:50 AM9/23/20
to Prometheus Users
Hi Prometheus Users,

When using PromQL functions such as "increase", the initial value isn't considered during the calculation because the initial counter value isn't 0 (For example, Kafka JMX metrics which jmx_exporter scapes will likely have a non 0 value). In the context of JMX Exporter, not sure if there is a way to work around this but It would be great if there could be a way to configure the initial value of the Counter through configuration.

Any thoughts?

Brian Candler

unread,
Sep 23, 2020, 4:17:44 AM9/23/20
to Prometheus Users

In short, what you ask doesn't make sense.  You don't know a timestamp for the counter when it had a value of 0 - and therefore you can't calculate the rate of increase.  In turn, the way the increase() function works is to extrapolate the rate over the time window.  This allows it, amongst other things, to work in the face of counter resets.
Reply all
Reply to author
Forward
0 new messages