Created
March 1, 2019 05:25
-
-
Save tacahiroy/50870f9591970e9fb8c73ef091fd0f9e to your computer and use it in GitHub Desktop.
Filter instances by EC2 tag Name in Prometheus config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scrape_configs: | |
| - job_name: 'ec2' | |
| ec2_sd_configs: | |
| - region: '{{ prometheus_aws_region }}' | |
| access_key: '{{ prometheus_aws_access_key }}' | |
| secret_key: '{{ prometheus_aws_secret_access_key }}' | |
| port: 9100 | |
| refresh_interval: 1h | |
| filters: | |
| - name: 'tag:Name' | |
| values: ['tag-A', tag-B', 'tag-C'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment