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

mem stats are of type counter (instead of gauge) #3835

Closed
amoghe opened this issue Feb 26, 2018 · 4 comments
Closed

mem stats are of type counter (instead of gauge) #3835

amoghe opened this issue Feb 26, 2018 · 4 comments
Labels
bug unexpected problem or unintended behavior

Comments

@amoghe
Copy link
Contributor

amoghe commented Feb 26, 2018

Steps to reproduce:

  1. Start telegraf with [[inputs.mem]]
  2. Observe that mem stats like "total", "available", "used" are all added using AddCounter

Expected behavior:

I expected these to be Gauges, since they are absolute utilization numbers

Maybe I'm missing context on why these have the Counter type. I could work on adding a note to the README if needed to clarify this.

@amoghe
Copy link
Contributor Author

amoghe commented Feb 26, 2018

@sparrc , looks like this was added in b18d375 . But the commit message doesn't indicate why a counter was chosen as the type for this (and other) metrics.

I notice that swap plugin differentiates between emitting its gauges and counters (emitting both, depending on the metric). Maybe thats the right approach for the mem plugin as well? (Unless I've misunderstood something)

@danielnelson
Copy link
Contributor

Looks like a bug to me, we can change those fields to be Gauges.

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Mar 6, 2018
@amoghe
Copy link
Contributor Author

amoghe commented Mar 6, 2018

I can take a stab at this, if you'd like.

@danielnelson
Copy link
Contributor

Sure, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants