Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most gauges are actually counters #30

Open
discordianfish opened this issue Jun 24, 2015 · 13 comments

Comments

Projects
None yet
9 participants
@discordianfish
Copy link
Member

commented Jun 24, 2015

Looks like haproxy exporter uses gauges for most metrics although they are in fact counters, e.g:

# TYPE haproxy_backend_bytes_in_total gauge
...
# TYPE haproxy_backend_http_responses_total gauge
...
...
@juliusv

This comment has been minimized.

Copy link
Member

commented Jun 24, 2015

Probably because that was introduced in January 2013, and Counters likely didn't have a Set() back then. 👍 for changing this.

@mmoya

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2016

Anyone working on this?

@juliusv

This comment has been minimized.

Copy link
Member

commented Apr 11, 2016

IIRC I've heard @grobie say once or twice that he wanted to rewrite the entire HAProxy exporter (the design is really awkward at the moment), but I'm not sure if that's still the plan.

@grobie

This comment has been minimized.

Copy link
Member

commented Apr 11, 2016

It's halfway done, but so many things.

@bitfehler

This comment has been minimized.

Copy link
Contributor

commented May 26, 2016

On a somewhat related note, haproxy is introducing a "typed" output format, that tells you for every value "what to expect of it": http://git.haproxy.org/?p=haproxy.git;a=blob;f=doc/management.txt;h=119c3fa6da71ff180dae58228372cca549d8af18;hb=HEAD#l1040
I guess that could (one day) be used to get rid of all the hardcoding?

@noushi

This comment has been minimized.

Copy link

commented Jul 4, 2016

@grobie, will the new exporter retain the same invocation args?

@brian-brazil

This comment has been minimized.

Copy link
Member

commented Jul 4, 2016

This is mainly internal refactoring, there wouldn't be user-visible changes.

@mmoya

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2016

Can somebody provide feedback on #57?

@grobie grobie added the bug label Jul 20, 2017

@grobie

This comment has been minimized.

Copy link
Member

commented Nov 30, 2017

@ingshtrom

This comment has been minimized.

Copy link

commented Jul 17, 2018

While many of these metrics are indeed counters, won't things break every time that HAProxy reloads/restarts because all of the metrics will be reset to zero or decrease, depending on the timing of the scrape. If haproxy_exporter kept knowledge of these metrics through restarts/reloads, then counters make good sense.

Am I missing something here?

@brian-brazil

This comment has been minimized.

Copy link
Member

commented Jul 17, 2018

Functions such as rate are designed to handle counter resets. If that were a problem, we'd already be seeing it. This issue is about fixing some incorrect metadata, but that metadata is currently not used for anything.

@jkohen

This comment has been minimized.

Copy link

commented Jul 29, 2018

@brian-brazil https://github.com/Stackdriver/stackdriver-prometheus is using the metadata, and so I'm starting to see reports like oliver006/redis_exporter#178
From your comment I understand that for plain old Prometheus it's completely safe to simply change the metric type from gauge to counter in the exporter, right?

@brian-brazil

This comment has been minimized.

Copy link
Member

commented Jul 29, 2018

Yes, completely safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.