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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Copy link
Member

brian-brazil commented May 19, 2016

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

brian-brazil commented May 19, 2016

@chbatey

This comment has been minimized.

Copy link
Author

chbatey commented May 23, 2016

Thanks @brian-brazil

@apandey2017

This comment has been minimized.

Copy link

apandey2017 commented Oct 3, 2017

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

This comment has been minimized.

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.
You can’t perform that action at this time.