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 full regex support for mapping configuration #21

Closed
wants to merge 1 commit into from

Conversation

bakins
Copy link

@bakins bakins commented Oct 19, 2016

This is a quick hack to allow the use of full regex expressions for the mapping configuration. Currently, I'm imploring some legacy metrics and this makes it a bit less laborious.

@brian-brazil
Copy link
Contributor

Can you give examples of metrics you're seeing that aren't following the standard graphite dotted string convention?

@bakins
Copy link
Author

bakins commented Oct 19, 2016

We have some metrics that are currently a bit "messy." Something like: foo.bar.mysql_something.foo_bar and we actually want to map the label as msyql=something rather than mysql=mysql_something. We could do that in the prometheus scrape config, but that seemed more fragile.

This is admittedly a bit of a hack for collecting from a legacy system, but we found it helpful.

@brian-brazil
Copy link
Contributor

If it's just one unusual system you have, it may be better for you to handle this with a metric_relabel_config than to complicate the graphite exporter and all other exporters using this code.

@bakins
Copy link
Author

bakins commented Oct 20, 2016

Thanks for taking the time to look at this and provide feedback. We will take a look at what you suggested.

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