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).
|
|
|
|
|
2015-09-29 08:51:03 -07:00
|
|
|
external_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"
|
|
|
|
- "my/*.rules"
|
2015-05-07 01:55:03 -07:00
|
|
|
|
2016-10-01 08:42:43 -07:00
|
|
|
remote_write:
|
2017-02-13 12:43:20 -08:00
|
|
|
- url: http://remote1/push
|
|
|
|
write_relabel_configs:
|
|
|
|
- source_labels: [__name__]
|
|
|
|
regex: expensive.*
|
|
|
|
action: drop
|
|
|
|
- url: http://remote2/push
|
2019-03-12 03:24:15 -07:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2016-10-01 08:42:43 -07:00
|
|
|
|
2017-10-18 04:08:14 -07:00
|
|
|
remote_read:
|
|
|
|
- url: http://remote1/read
|
|
|
|
read_recent: true
|
|
|
|
- url: http://remote3/read
|
|
|
|
read_recent: false
|
2017-11-11 17:23:20 -08:00
|
|
|
required_matchers:
|
|
|
|
job: special
|
2019-03-12 03:24:15 -07:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2017-10-18 04:08:14 -07:00
|
|
|
|
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:
|
2016-05-29 17:34:18 -07:00
|
|
|
- files:
|
2015-06-12 04:39:12 -07:00
|
|
|
- foo/*.slow.json
|
|
|
|
- foo/*.slow.yml
|
|
|
|
- single/file.yml
|
|
|
|
refresh_interval: 10m
|
2016-05-29 17:34:18 -07:00
|
|
|
- files:
|
2015-06-12 04:39:12 -07:00
|
|
|
- bar/*.yaml
|
|
|
|
|
2016-06-08 06:54:04 -07:00
|
|
|
static_configs:
|
2015-06-12 04:39:12 -07:00
|
|
|
- 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:
|
2016-02-14 13:20:39 -08:00
|
|
|
- source_labels: [job, __meta_dns_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-11-16 04:16:13 -08:00
|
|
|
- source_labels: [abc]
|
|
|
|
target_label: cde
|
|
|
|
- replacement: static
|
|
|
|
target_label: abc
|
2016-11-03 06:34:15 -07:00
|
|
|
- regex:
|
|
|
|
replacement: static
|
|
|
|
target_label: abc
|
2015-06-12 04:39:12 -07:00
|
|
|
|
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
|
2017-05-29 04:46:23 -07:00
|
|
|
password: "multiline\nmysecret\ntest"
|
2015-06-12 04:39:12 -07:00
|
|
|
|
|
|
|
scrape_interval: 50s
|
|
|
|
scrape_timeout: 5s
|
|
|
|
|
2016-12-16 07:08:50 -08:00
|
|
|
sample_limit: 1000
|
|
|
|
|
2015-06-12 04:39:12 -07:00
|
|
|
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
|
2016-12-14 02:17:42 -08:00
|
|
|
- action: labeldrop
|
|
|
|
regex: d
|
|
|
|
- action: labelkeep
|
|
|
|
regex: k
|
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'
|
2017-06-01 14:14:23 -07:00
|
|
|
token: mysecret
|
2015-06-12 14:16:13 -07:00
|
|
|
services: ['nginx', 'cache', 'mysql']
|
2018-03-23 07:48:43 -07:00
|
|
|
tag: "canary"
|
|
|
|
node_meta:
|
|
|
|
rack: "123"
|
|
|
|
allow_stale: true
|
2017-03-07 06:47:40 -08:00
|
|
|
scheme: https
|
|
|
|
tls_config:
|
|
|
|
ca_file: valid_ca_file
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
|
|
|
insecure_skip_verify: false
|
2015-07-22 08:48:22 -07:00
|
|
|
|
2016-10-18 15:19:19 -07:00
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [__meta_sd_consul_tags]
|
2016-10-19 03:31:55 -07:00
|
|
|
separator: ','
|
2016-10-18 15:19:19 -07:00
|
|
|
regex: label:([^=]+)=([^,]+)
|
|
|
|
target_label: ${1}
|
|
|
|
replacement: ${2}
|
|
|
|
|
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
|
|
|
|
2017-05-29 04:46:23 -07:00
|
|
|
bearer_token: mysecret
|
2015-07-18 14:23:58 -07:00
|
|
|
|
|
|
|
- job_name: service-kubernetes
|
|
|
|
|
|
|
|
kubernetes_sd_configs:
|
2016-10-17 02:50:54 -07:00
|
|
|
- role: endpoints
|
2016-10-10 03:42:01 -07:00
|
|
|
api_server: 'https://localhost:1234'
|
2019-03-12 03:24:15 -07:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2015-10-23 08:47:10 -07:00
|
|
|
|
|
|
|
basic_auth:
|
|
|
|
username: 'myusername'
|
2017-05-29 04:46:23 -07:00
|
|
|
password: 'mysecret'
|
2015-09-02 06:08:37 -07:00
|
|
|
|
2017-04-19 05:36:34 -07:00
|
|
|
- job_name: service-kubernetes-namespaces
|
|
|
|
|
|
|
|
kubernetes_sd_configs:
|
|
|
|
- role: endpoints
|
|
|
|
api_server: 'https://localhost:1234'
|
|
|
|
namespaces:
|
|
|
|
names:
|
|
|
|
- default
|
|
|
|
|
2019-03-12 03:24:15 -07:00
|
|
|
basic_auth:
|
|
|
|
username: 'myusername'
|
|
|
|
password_file: valid_password_file
|
|
|
|
|
|
|
|
|
2015-09-02 06:08:37 -07:00
|
|
|
- job_name: service-marathon
|
|
|
|
marathon_sd_configs:
|
|
|
|
- servers:
|
2016-09-29 05:57:28 -07:00
|
|
|
- 'https://marathon.example.com:443'
|
|
|
|
|
2018-04-05 01:08:18 -07:00
|
|
|
auth_token: "mysecret"
|
2016-09-29 05:57:28 -07:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2015-09-21 11:49:19 -07:00
|
|
|
|
|
|
|
- job_name: service-ec2
|
|
|
|
ec2_sd_configs:
|
|
|
|
- region: us-east-1
|
|
|
|
access_key: access
|
2017-05-29 04:46:23 -07:00
|
|
|
secret_key: mysecret
|
2016-11-03 07:54:27 -07:00
|
|
|
profile: profile
|
2018-03-30 23:51:11 -07:00
|
|
|
filters:
|
|
|
|
- name: tag:environment
|
|
|
|
values:
|
|
|
|
- prod
|
|
|
|
|
|
|
|
- name: tag:service
|
|
|
|
values:
|
|
|
|
- web
|
|
|
|
- db
|
2016-01-09 15:34:32 -08:00
|
|
|
|
2016-04-06 20:47:02 -07:00
|
|
|
- job_name: service-azure
|
|
|
|
azure_sd_configs:
|
2018-09-04 08:55:40 -07:00
|
|
|
- environment: AzurePublicCloud
|
2018-12-19 02:03:33 -08:00
|
|
|
authentication_method: OAuth
|
2018-09-04 08:55:40 -07:00
|
|
|
subscription_id: 11AAAA11-A11A-111A-A111-1111A1111A11
|
2016-04-06 20:47:02 -07:00
|
|
|
tenant_id: BBBB222B-B2B2-2B22-B222-2BB2222BB2B2
|
|
|
|
client_id: 333333CC-3C33-3333-CCC3-33C3CCCCC33C
|
2017-05-29 04:46:23 -07:00
|
|
|
client_secret: mysecret
|
2016-04-06 20:47:02 -07:00
|
|
|
port: 9100
|
|
|
|
|
2016-01-09 15:34:32 -08:00
|
|
|
- job_name: service-nerve
|
|
|
|
nerve_sd_configs:
|
|
|
|
- servers:
|
|
|
|
- localhost
|
|
|
|
paths:
|
|
|
|
- /monitoring
|
2016-09-14 23:00:14 -07:00
|
|
|
|
|
|
|
- job_name: 0123service-xxx
|
|
|
|
metrics_path: /metrics
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- localhost:9090
|
|
|
|
|
|
|
|
- job_name: 測試
|
|
|
|
metrics_path: /metrics
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- localhost:9090
|
2016-11-23 03:42:33 -08:00
|
|
|
|
2016-12-27 18:16:47 -08:00
|
|
|
- job_name: service-triton
|
|
|
|
triton_sd_configs:
|
|
|
|
- account: 'testAccount'
|
|
|
|
dns_suffix: 'triton.example.com'
|
|
|
|
endpoint: 'triton.example.com'
|
|
|
|
port: 9163
|
|
|
|
refresh_interval: 1m
|
|
|
|
version: 1
|
|
|
|
tls_config:
|
2019-03-12 03:24:15 -07:00
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2016-12-27 18:16:47 -08:00
|
|
|
|
2018-09-24 07:08:42 -07:00
|
|
|
- job_name: service-openstack
|
|
|
|
openstack_sd_configs:
|
|
|
|
- role: instance
|
|
|
|
region: RegionOne
|
|
|
|
port: 80
|
|
|
|
refresh_interval: 1m
|
|
|
|
tls_config:
|
|
|
|
ca_file: valid_ca_file
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
|
|
|
|
2016-11-23 03:42:33 -08:00
|
|
|
alerting:
|
|
|
|
alertmanagers:
|
|
|
|
- scheme: https
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- "1.2.3.4:9093"
|
|
|
|
- "1.2.3.5:9093"
|
|
|
|
- "1.2.3.6:9093"
|