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

Custom target labels #6

Open
aequitas opened this issue Mar 28, 2019 · 1 comment
Open

Custom target labels #6

aequitas opened this issue Mar 28, 2019 · 1 comment

Comments

@aequitas
Copy link

For our use case the TARGETS_LABEL_NAME is currently to limited. I was thinking of contributing support for custom target labels and am curious about your idea about them.

I'm thinking of something like this:

TARGETS=http://localhost:8081/metrics#label_name=value,http://localhost:8082/metrics#label_name=value2|label_name2=value3

Or:

TARGETS=http://localhost:8081/metrics,http://localhost:8082/metrics

LABELS=label_name=value,label_name=value2|label_name2=value3

The second requires less hijacking of the URL notation, but might cause more human error with multiple targets.

@warmans
Copy link
Owner

warmans commented Mar 28, 2019

Sure, if that would be useful to you feel free to submit a PR. For me the first version looks a bit better. I'm not sure there's any cleaner way to do it with flags/environment variables, they're not really very good for these sorts of structures. But if you need help let me know.

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

No branches or pull requests

2 participants