· 6 years ago · Sep 06, 2019, 07:04 AM
1 scrape_configs:
2 - job_name: 'ec2node'
3 ec2_sd_configs:
4 - region: eu-central-1
5 access_key:
6 secret_key:
7 port: 9100
8 # Only monitor instances with a ip starting with 172.30 starting with "172.30"
9 relabel_configs:
10 - source_labels: [__meta_ec2_private_ip]
11 regex: 172.30.*
12 action: keep
13 # Copy all labels
14 - source_labels: [*]
15 regex: '..*/(.*)'
16 target_label: *