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:
|
2015-06-12 04:39:12 -07:00
|
|
|
monitor: codelab
|
|
|
|
foo: bar
|
2015-05-07 01:55:03 -07:00
|
|
|
|
|
|
|
rule_files:
|
2015-06-12 04:39:12 -07:00
|
|
|
- "first.rules"
|
2015-08-05 09:04:34 -07:00
|
|
|
- "/absolute/second.rules"
|
2015-06-12 04:39:12 -07:00
|
|
|
- "my/*.rules"
|
2015-05-07 01:55:03 -07:00
|
|
|
|
|
|
|
scrape_configs:
|
2015-06-12 04:39:12 -07:00
|
|
|
- job_name: prometheus
|
2015-05-07 01:55:03 -07:00
|
|
|
|
2015-06-22 13:35:19 -07:00
|
|
|
honor_labels: true
|
2015-06-12 04:39:12 -07:00
|
|
|
# scrape_interval is defined by the configured global (15s).
|
|
|
|
# scrape_timeout is defined by the global default (10s).
|
2015-05-07 01:55:03 -07:00
|
|
|
|
2015-06-12 04:39:12 -07:00
|
|
|
# metrics_path defaults to '/metrics'
|
|
|
|
# scheme defaults to 'http'.
|
2015-05-07 01:55:03 -07:00
|
|
|
|
2015-06-12 04:39:12 -07:00
|
|
|
file_sd_configs:
|
|
|
|
- names:
|
|
|
|
- foo/*.slow.json
|
|
|
|
- foo/*.slow.yml
|
|
|
|
- single/file.yml
|
|
|
|
refresh_interval: 10m
|
|
|
|
- names:
|
|
|
|
- bar/*.yaml
|
|
|
|
|
|
|
|
target_groups:
|
|
|
|
- targets: ['localhost:9090', 'localhost:9191']
|
2015-05-07 01:55:03 -07:00
|
|
|
labels:
|
2015-06-12 04:39:12 -07:00
|
|
|
my: label
|
|
|
|
your: label
|
|
|
|
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [job, __meta_dns_srv_name]
|
2015-09-01 06:05:14 -07:00
|
|
|
regex: (.*)some-[regex]
|
2015-06-12 04:39:12 -07:00
|
|
|
target_label: job
|
|
|
|
replacement: foo-${1}
|
|
|
|
# action defaults to 'replace'
|
|
|
|
|
2015-08-05 09:04:34 -07:00
|
|
|
bearer_token_file: valid_token_file
|
|
|
|
|
2015-06-12 04:39:12 -07:00
|
|
|
|
|
|
|
- job_name: service-x
|
|
|
|
|
|
|
|
basic_auth:
|
2015-07-06 05:25:20 -07:00
|
|
|
username: admin_name
|
|
|
|
password: admin_password
|
2015-06-12 04:39:12 -07:00
|
|
|
|
|
|
|
scrape_interval: 50s
|
|
|
|
scrape_timeout: 5s
|
|
|
|
|
|
|
|
metrics_path: /my_path
|
|
|
|
scheme: https
|
|
|
|
|
|
|
|
dns_sd_configs:
|
|
|
|
- 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]
|
2015-09-01 06:05:14 -07:00
|
|
|
regex: (.*)some-[regex]
|
2015-06-12 04:39:12 -07:00
|
|
|
action: drop
|
2015-06-24 00:07:17 -07:00
|
|
|
- source_labels: [__address__]
|
|
|
|
modulus: 8
|
2015-08-13 02:39:21 -07:00
|
|
|
target_label: __tmp_hash
|
2015-06-24 00:07:17 -07:00
|
|
|
action: hashmod
|
2015-08-13 02:39:21 -07:00
|
|
|
- source_labels: [__tmp_hash]
|
2015-09-01 06:05:14 -07:00
|
|
|
regex: 1
|
2015-06-24 00:07:17 -07:00
|
|
|
action: keep
|
2015-09-21 12:41:19 -07:00
|
|
|
- action: labelmap
|
|
|
|
regex: 1
|
2015-06-12 04:39:12 -07:00
|
|
|
|
2015-06-12 14:16:13 -07:00
|
|
|
metric_relabel_configs:
|
|
|
|
- source_labels: [__name__]
|
2015-09-01 06:05:14 -07:00
|
|
|
regex: expensive_metric.*
|
2015-06-12 14:16:13 -07:00
|
|
|
action: drop
|
2015-06-12 04:39:12 -07:00
|
|
|
|
|
|
|
- job_name: service-y
|
|
|
|
|
|
|
|
consul_sd_configs:
|
|
|
|
- server: 'localhost:1234'
|
2015-06-12 14:16:13 -07:00
|
|
|
services: ['nginx', 'cache', 'mysql']
|
2015-07-22 08:48:22 -07:00
|
|
|
|
|
|
|
- job_name: service-z
|
|
|
|
|
2015-09-06 16:07:44 -07:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2015-07-22 08:48:22 -07:00
|
|
|
|
|
|
|
bearer_token: avalidtoken
|
2015-07-18 14:23:58 -07:00
|
|
|
|
|
|
|
- job_name: service-kubernetes
|
|
|
|
|
|
|
|
kubernetes_sd_configs:
|
2015-09-03 02:47:09 -07:00
|
|
|
- masters:
|
|
|
|
- 'https://localhost:1234'
|
2015-07-18 14:23:58 -07:00
|
|
|
username: 'myusername'
|
|
|
|
password: 'mypassword'
|
2015-09-02 06:08:37 -07:00
|
|
|
|
|
|
|
- job_name: service-marathon
|
|
|
|
marathon_sd_configs:
|
|
|
|
- servers:
|
|
|
|
- 'http://marathon.example.com:8080'
|