Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Negative gauge values #43

Open
Evertras opened this issue Jul 22, 2016 · 1 comment
Open

Negative gauge values #43

Evertras opened this issue Jul 22, 2016 · 1 comment

Comments

@Evertras
Copy link

Right now sending the following values...

val:-1|g
val:-1|g
val:-1|g

...in a flush cycle will output a final value of -3. But since this is a gauge, it's expected to be -1. This appears to be due to the following code:

https://github.com/github/brubeck/blob/master/src/samplers/statsd.c#L105

https://github.com/github/brubeck/blob/master/src/metric.c#L48

There seem to be some statsd aggregators that support negative gauges and some that do not. What is brubeck's stance, and what would be the best recommended way to get this functionality from brubeck? Maybe a runtime configuration switch to remove relative values from gauges altogether?

@alindeman
Copy link
Contributor

alindeman commented Oct 29, 2016

Unfortunately this is actually the correct behavior according to statsd: https://github.com/etsy/statsd/blob/master/docs/metric_types.md#gauges

This implies you can't explicitly set a gauge to a negative number without first setting it to zero.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants