2015-05-07 01:55:03 -07:00
|
|
|
# my global config
|
2015-05-07 07:47:18 -07:00
|
|
|
global:
|
2015-05-07 01:55:03 -07:00
|
|
|
scrape_interval: 15s
|
|
|
|
evaluation_interval: 30s
|
|
|
|
# scrape_timeout is set to the global default (10s).
|
|
|
|
|
|
|
|
labels:
|
|
|
|
monitor: codelab
|
|
|
|
foo: bar
|
|
|
|
|
|
|
|
rule_files:
|
|
|
|
- "first.rules"
|
|
|
|
- "second.rules"
|
|
|
|
|
|
|
|
scrape_configs:
|
|
|
|
- job_name: prometheus
|
|
|
|
|
|
|
|
# scrape_interval is defined by the configured global (15s).
|
|
|
|
# scrape_timeout is defined by the global default (10s).
|
|
|
|
|
|
|
|
# metrics_path defaults to '/metrics'
|
|
|
|
# scheme defaults to 'http'.
|
|
|
|
|
|
|
|
labels:
|
|
|
|
foo: baz
|
|
|
|
|
|
|
|
target_groups:
|
|
|
|
- targets: ['localhost:9090', 'localhost:9191']
|
|
|
|
labels:
|
|
|
|
my: label
|
|
|
|
your: label
|
|
|
|
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [job, __meta_dns_srv_name]
|
|
|
|
regex: (.*)some-[regex]$
|
|
|
|
target_label: job
|
|
|
|
replacement: foo-${1}
|
|
|
|
# action defaults to 'replace'
|
|
|
|
|
|
|
|
|
|
|
|
- job_name: service-x
|
|
|
|
|
2015-05-15 03:47:50 -07:00
|
|
|
basic_auth:
|
|
|
|
username: admin
|
|
|
|
password: password
|
|
|
|
|
2015-05-07 01:55:03 -07:00
|
|
|
scrape_interval: 50s
|
|
|
|
scrape_timeout: 5s
|
|
|
|
|
|
|
|
metrics_path: /my_path
|
2015-05-15 03:47:50 -07:00
|
|
|
scheme: https
|
2015-05-07 01:55:03 -07:00
|
|
|
|
2015-05-07 07:47:18 -07:00
|
|
|
dns_sd_configs:
|
2015-05-07 01:55:03 -07:00
|
|
|
- refresh_interval: 15s
|
|
|
|
names:
|
|
|
|
- first.dns.address.domain.com
|
|
|
|
- second.dns.address.domain.com
|
|
|
|
- names:
|
|
|
|
- first.dns.address.domain.com
|
|
|
|
# refresh_interval defaults to 30s.
|
|
|
|
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [job]
|
|
|
|
regex: (.*)some-[regex]$
|
|
|
|
action: drop
|