-
Notifications
You must be signed in to change notification settings - Fork 805
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
Global labels #121
Comments
That's an anti-pattern, target labels should be provided at the Prometheus level via relabelling rather than from clients or exporters. |
Thanks! This might solve half my use case. Can you point me to some examples of relabelling_config? But take the case of env=beta/qa/prod, in a dynamic environment such as AWS, its impossible to have static relabelling config. How do you propose I fix this? |
You can use EC2 tags for example to determine you labels. See http://www.robustperception.io/automatically-monitoring-ec2-instances/ |
Well, that is out of the window! We are using tags for everything and as a result the tags API is throttled when we are spinning up machines rapidly. We are currently implementing the SD as a hack for now and will move to consul soon. Hmm, I think I will make a wrapper over the Prometheus collectors that would automatically insert such info. Hope moving to consul will fix most of the issues of the peculiar use-case we have. Thanks! |
Consul tags are a list rather than key/value so while you can use them with relabelling it's a bit more difficult. |
Hi,
I want to add a label to all the metrics exposed. Just like prometheus appends instance label to all the metrics of a client, I want to add it at the client level.
For example I want to add env=test to all the metrics. Is it possible? If its not possible, would you a accept a PR?
Thanks,
Goutham.
The text was updated successfully, but these errors were encountered: