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

Optional Filter for EC2 Discovery #3920

Closed
Zordrak opened this Issue Mar 7, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@Zordrak
Copy link

Zordrak commented Mar 7, 2018

I would really like to see an optional filter for AWS EC2 Discovery.

Currently, prometheus describes all instances, and then filters the results locally. In an AWS account with hundreds or thousands of instances, many of which are not related to prometheus' monitoring configuration, the amount of data requested and returned from the API is unnecessarily huge and time-consuming.

I would like to able to provide a custom filter string to be used with the DescribeInstances API call, so that the API only returns relevant instances for further processing.

Here's a really really bad example, but an example nonetheless of something we have done to patch in the functionality. We should not have done it in this hardcoded, and environment-variable-dependent manner, but it works for now:

                        &ec2.Filter{
                                Name:   aws.String("tag:Environment"),
                                Values: []*string{aws.String(os.Getenv("ENVIRONMENT"))},
                        },
@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 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 22, 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.