statsd.net
statsd.net copied to clipboard
Changing the statsdnet name doesn't actually modify the metric key
My understanding was that updating the <statsdnet name="statsd"> name attribute would modify the first piece of the metric to be "statsd" instead of "statsdnet". For some reason this doesn't appear to be the case in my testing.
Hi Phillip, that will only change what's used when logging service-level metrics such as bad lines seen etc.
To modify the first piece of every metric you'll need to update the sections inside the
<aggregation flushInterval="5s">
<gauges namespace="stats.gauges" removeZeroGauges="true" />
<counters namespace="stats.counters" />
<sets namespace="stats.sets" />
<calendargrams namespace="stats.calgrams" />
<timers namespace="stats.timers" calculateSumSquares="false">
<percentile name="p90-5min" threshold="90" flushInterval="5m" />
<percentile name="p90-1hour" threshold="90" flushInterval="1h" />
<percentile name="p50-1hour" threshold="50" flushInterval="1h" />
</timers>
</aggregation>
In this example, every metric will be prefixed with "stats."
Thanks, Luke
Ah, I see where I misunderstood. Thanks! Is there any way to turn off the service-level stats? With Librato and some other services we are paying per metric so unnecessary stats would be nice to disable.
Yep definitely, just add a property called "hideSystemStats" to the root node and set it to true, like so:
<statsdnet name="statsdnet" hideSystemStats="true">
<listeners>
...
Good luck and let me know how it goes!
Cheers, Luke
Not sure why, but after setting that attribute to true and restarting the service, these 5 metrics keep showing up:
statsdnet.statsdnet.backends.librato.lines
statsdnet.statsdnet.backends.librato.post.attempt
statsdnet.statsdnet.backends.librato.post.success
statsdnet.statsdnet.outputBuffer
statsdnet.statsdnet.up
hmm that's interesting. I'll have to investigate that.
Hey Luke, I appreciate your responses. As I was thinking about this, I realized that I'm actually running two instances of statsd.net and didn't change one of the configs. I'm going to try fixing that and I'm assuming this issue will resolve itself :+1: