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

nsqadmin: statsd prefix 'stats_counts' is outdated, but hardcoded #655

Closed
kesutton opened this issue Sep 23, 2015 · 6 comments
Closed

nsqadmin: statsd prefix 'stats_counts' is outdated, but hardcoded #655

kesutton opened this issue Sep 23, 2015 · 6 comments

Comments

@kesutton
Copy link

I just installed NSQ 0.3.5, and was looking forward to the graphite integration. I am using the built-in statsd power of nsqd, and that is working great. However, it looks like nsqadmin is failing because of the statsd prefix "stats_counts". According to this site: https://github.com/etsy/statsd/blob/master/docs/graphite.md, "stats_counts" is outdated, in favor of "stats.counters". This is similar for gauges.

It would be nice to have the counters/gauges statsd prefix field be configurable, so nsqadmin will integrate with newer versions of statsd. Right now I believe it is hardcoded here:

prefix = 'stats_counts.' + prefix;

@kesutton
Copy link
Author

I actually overlooked this -

prefix = 'stats.gauges.' + prefix;

The gauges prefix is already correct as "stats.gauges", so it is just stats.counters that would be configurable (or updated)

@mreiferson
Copy link
Member

@kesutton I highly recommend disabling statsd's built in prefixes but I think we would merge a change to update that line to stats.counts.

Want to to open a PR?

@kesutton
Copy link
Author

What do you mean disabling statsd's built in prefixes? I don't think that is possible in statsd, otherwise you wouldn't know the difference between a "counter" and a "gauge". You can change those prefixes, as specified here: https://github.com/etsy/statsd/blob/master/docs/namespacing.md. That could be a workaround for this situation by modifying "prefixCounter" to "stats_counts", but that would make the stats hierarchy uneven.

Or did you mean turning off nsqadmin's "use_statsd_prefixes"? If I did that, then the stats wouldn't work at all, because then nsqadmin would be looking in graphite for stats that start with the nsq stats prefix ("nsq.%s"), of which there are no stats since statsd always (I thought) puts some prefix in there.

Please advise.

I'd be happy to open a PR.

@kesutton
Copy link
Author

Also, do you want PRs against the "master" or "dev" branch? Looks like dev is behind. I'll make it to master and change if you need.

@mreiferson
Copy link
Member

Looking at this document it looks like you can just use empty strings for all the prefixes?

Or you can use something like statsdaemon.

Finally, it looks like if you set legacyNamespace to true you'll get the keys under the right namespace for the current state of NSQ, stats_counts.

@mreiferson
Copy link
Member

"fixed" in #656

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

No branches or pull requests

2 participants