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

Add support for statsd gauge bucket in statsd output writer #44

Open
NGough34 opened this issue Aug 3, 2015 · 5 comments
Open

Add support for statsd gauge bucket in statsd output writer #44

NGough34 opened this issue Aug 3, 2015 · 5 comments

Comments

@NGough34
Copy link

NGough34 commented Aug 3, 2015

Statsd allows for collection of stats in a few different data types: https://github.com/etsy/statsd/blob/master/docs/metric_types.md

I propose adding a bucketType field to the statsd output writer to allow configuring these different types of buckets - particularly the GAUGE type.

Is there any reason this hasn't been implemented? I can see in the code it is hardcoded to COUNT type. One issue I foresee is you inherently have the same bucketType for all queries, which will likely not be the case ie. you are collecting gauges and times but you've configured your output for a gauge.

I have implemented and semi-tested the GAUGE type so far.

@cyrille-leclerc
Copy link
Member

Thanks @NGough34, you are right, I don't see any reason why we could not support GAUGE as well. Can you submit a PR?

@mindkir
Copy link

mindkir commented Jan 18, 2017

jmxtrans-agent-1.2.4.jar still return all mbean attributes as counters, eg:
jmxtransagent.hostname.appname.env.OperatingSystem.ProcessCpuLoad:0.0045351473922902496|c

'java.lang:type=OperatingSystem' mbean 'ProcessCpuLoad' attribute is of Type 'double' and it should be metricType 'gauge'. Is there a way to configure this in existing jmxtrans-agent version?

@mindkir
Copy link

mindkir commented Jan 20, 2017

Found answer to this. Need to add "type" property along with mbean query, eg:
<query objectName="java.lang:type=OperatingSystem" attributes="MaxFileDescriptorCount,OpenFileDescriptorCount,ProcessCpuLoad,SystemCpuLoad,SystemLoadAverage" type="gauge" resultAlias="#attribute#,mbean=%type%"/>

Might be good to add to documentation/configuration examples.

@rtoma
Copy link
Contributor

rtoma commented Jan 20, 2017

Hi @mindkir, feel free to submit a pr for a doc fix. I am sure @cyrille-leclerc would appreciate that.

@cyrille-leclerc
Copy link
Member

Thanks @mindkir and @rtoma.
@mindkir can you please review #92 ?

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

No branches or pull requests

4 participants