Skip to content

Instantly share code, notes, and snippets.

@tacahiroy
Created March 1, 2019 05:25
Show Gist options
  • Select an option

  • Save tacahiroy/50870f9591970e9fb8c73ef091fd0f9e to your computer and use it in GitHub Desktop.

Select an option

Save tacahiroy/50870f9591970e9fb8c73ef091fd0f9e to your computer and use it in GitHub Desktop.
Filter instances by EC2 tag Name in Prometheus config
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