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

Limit EC2 SD by tag #1642

Closed
chbatey opened this issue May 19, 2016 · 6 comments
Closed

Limit EC2 SD by tag #1642

chbatey opened this issue May 19, 2016 · 6 comments

Comments

@chbatey
Copy link

chbatey commented May 19, 2016

From what I can tell from the docs/code the EC2 service discovery finds all EC2 instances for a region. In the typical EC2 deployments I work with I only want a subset of the instances to be monitored by prometheus so I'd like to tag these instances with something like Prometheus: True or Monitored: True.

I am happy to contribute the change is it is something you'll accept.

@brian-brazil
Copy link
Contributor

See https://prometheus.io/docs/operating/configuration/#ec2_sd_config

__meta_ec2_tag_<tagkey> contain the tags, and you can use a keep or drop action to limit based on them.

@chbatey
Copy link
Author

chbatey commented May 19, 2016

thanks @brian-brazil what do you mean by a keep or limit? I don't see that in the docs.

@brian-brazil
Copy link
Contributor

@chbatey
Copy link
Author

chbatey commented May 23, 2016

Thanks @brian-brazil

@apandey2017
Copy link

Hi @brian-brazil - how do we specify aws:cloudformation:stack-name in ? I could overcome : by _ but not having any luck with a - replacement in stack-name.

@lock
Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants