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 configuring statsd prefix #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petere
Copy link

@petere petere commented Jul 28, 2015

I was looking for a way to configure the statsd prefix used by this agent. Currently, it is hardcoded to use the full host name, but that does not work for me, because it needs to fit into a larger scheme of how statsd and graphite metrics are organized.

Here is a hackish patch that allows specifying the prefix as part of the agent arguments, like localhost:8125@60/myprefix. I'm not fond of this syntax, it's just a demo. Maybe this should be put into a more standard and flexible syntax like a URI?

Comments?

@rkuris
Copy link

rkuris commented Jul 28, 2015

This is important to us also! Originally, we wanted a prefix of 'cassandra.clustername' where clustername is a munged version of the name of the cluster. It's a challenge to get the clustername before the configuration is parsed, and I wasn't super keen on parsing the Cassandra configuration file itself.

I like the URL idea a lot. I think the crazy syntax originally started from host:port but then we needed an interval, and I didn't like the question mark because you'd have to escape it. Maybe //hostname:port/prefix@60 or //hostname:port/prefix#60 would be better?

I'm open to anything that (a) makes it incrementally better (b) maintains backward compatibility (at least for one release); and (c) includes tests so it doesn't break in the next release.

AndrewGiblin added a commit to AndrewGiblin/cassandra-statsd-agent that referenced this pull request Nov 5, 2015
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

Successfully merging this pull request may close these issues.

2 participants