· 6 years ago · Aug 12, 2019, 01:42 AM
1global:
2 scrape_interval: 10s
3scrape_configs:
4 - job_name: node
5 static_configs:
6 - targets:
7 - localhost:9100
8 - job_name: python-app
9 static_configs:
10 - targets:
11 - localhost:8000
12 labels:
13 my_new_target_label: foo
14 - job_name: go-app
15 file_sd_configs:
16 - files:
17 - filesd.yaml
18 relabel_configs:
19 - target_label: instance
20 replacement: foo
21 - job_name: ec2_instances
22 ec2_sd_configs:
23 - region: eu-west-2
24 access_key: <REDACTED>
25 secret_key: <REDACTED>
26 relabel_configs:
27 - source_labels:
28 - __meta_ec2_tag_prometheus
29 - __meta_ec2_tag_app
30 regex: '.+;test|foo'
31 action: keep
32 - action: labelmap
33 regex: __meta_ec2_public_ip
34 replacement: public_ip
35 - job_name: cadvisor
36 static_configs:
37 - targets:
38 - localhost:8888
39 metric_relabel_configs:
40 - action: labeldrop
41 regex: 'container_label_.*'