HAProxy Exporter: Understand if haproxy_backend_connections_total metric is a gauge or a counter

160 views
Skip to first unread message

khaled.h...@gmail.com

unread,
Nov 30, 2017, 8:17:43 AM11/30/17
to Prometheus Users
Hi guys,

I use Prometheus 1.8 and I would like to understand more about haproxy metrics available in Prometheus using the HaProxy_exporter. In particular I would like to understand if the haproxy_backend_connections_total metric is a gauge or a counter: the reason is that I would like to use the increase() function in a query like this:
increase(sum(haproxy_backend_connections_total metric{...}))

I read in the documentation that the increase() function should only be used with counters, so before deploying anything I would like to be sure that this could be a good solution.

I would like to use the increase() function instead of the delta() because in my case a counter reset sometimes happen.

Thank you in advance for your time.

Have a nice day,

Khaled

Brian Brazil

unread,
Nov 30, 2017, 8:30:54 AM11/30/17
to khaled.h...@gmail.com, Prometheus Users
It's a counter, and you should use rate() or increase().

Brian
 

Thank you in advance for your time.

Have a nice day,

Khaled

--
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/300a78d4-099a-4063-9a6e-a79b750e2897%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Message has been deleted

khaled.h...@gmail.com

unread,
Dec 1, 2017, 3:24:16 AM12/1/17
to Prometheus Users
Thank you very much Brian! I have another question for you, if you don't mind: do you know where I can find the type for all ha_proxy metrics? It will be really useful for me.

Have a nice day,

Khaled


Il giorno giovedì 30 novembre 2017 14:30:54 UTC+1, Brian Brazil ha scritto:
On 30 November 2017 at 13:17, <khaled.h...@gmail.com> wrote:
Hi guys,

I use Prometheus 1.8 and I would like to understand more about haproxy metrics available in Prometheus using the HaProxy_exporter. In particular I would like to understand if the haproxy_backend_connections_total metric is a gauge or a counter: the reason is that I would like to use the increase() function in a query like this:
increase(sum(haproxy_backend_connections_total metric{...}))

I read in the documentation that the increase() function should only be used with counters, so before deploying anything I would like to be sure that this could be a good solution.

I would like to use the increase() function instead of the delta() because in my case a counter reset sometimes happen.

It's a counter, and you should use rate() or increase().

Brian
 

Thank you in advance for your time.

Have a nice day,

Khaled

--
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,
Dec 1, 2017, 3:37:02 AM12/1/17
to khaled.h...@gmail.com, Prometheus Users
On 1 December 2017 at 08:24, <khaled.h...@gmail.com> wrote:
Thank you very much Brian! I have another question for you, if you don't mind: do you know where I can find the type for all ha_proxy metrics? It will be really useful for me.

Technically you'd have to work from the HAProxy docs, but anything ending in _total is a counter.

Brian
 
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/2f560294-56a0-4f06-bd74-fba2203f0650%40googlegroups.com.

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



--
Reply all
Reply to author
Forward
0 new messages