2015-05-07 08:55:03 +00:00
|
|
|
# my global config
|
2015-05-07 14:47:18 +00:00
|
|
|
global:
|
2021-06-12 10:47:47 +00:00
|
|
|
scrape_interval: 15s
|
2015-05-07 08:55:03 +00:00
|
|
|
evaluation_interval: 30s
|
2023-05-30 08:22:23 +00:00
|
|
|
body_size_limit: 15MB
|
|
|
|
sample_limit: 1500
|
|
|
|
target_limit: 30
|
|
|
|
label_limit: 30
|
|
|
|
label_name_length_limit: 200
|
|
|
|
label_value_length_limit: 200
|
2015-05-07 08:55:03 +00:00
|
|
|
# scrape_timeout is set to the global default (10s).
|
|
|
|
|
2015-09-29 15:51:03 +00:00
|
|
|
external_labels:
|
2015-06-12 11:39:12 +00:00
|
|
|
monitor: codelab
|
2021-06-12 10:47:47 +00:00
|
|
|
foo: bar
|
2015-05-07 08:55:03 +00:00
|
|
|
|
|
|
|
rule_files:
|
2021-06-12 10:47:47 +00:00
|
|
|
- "first.rules"
|
|
|
|
- "my/*.rules"
|
2015-05-07 08:55:03 +00:00
|
|
|
|
2016-10-01 15:42:43 +00:00
|
|
|
remote_write:
|
2017-02-13 20:43:20 +00:00
|
|
|
- url: http://remote1/push
|
2019-12-12 20:47:23 +00:00
|
|
|
name: drop_expensive
|
2017-02-13 20:43:20 +00:00
|
|
|
write_relabel_configs:
|
2021-06-12 10:47:47 +00:00
|
|
|
- source_labels: [__name__]
|
|
|
|
regex: expensive.*
|
|
|
|
action: drop
|
2021-04-28 12:47:52 +00:00
|
|
|
oauth2:
|
|
|
|
client_id: "123"
|
|
|
|
client_secret: "456"
|
|
|
|
token_url: "http://remote1/auth"
|
2021-10-20 21:10:18 +00:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2021-04-28 12:47:52 +00:00
|
|
|
|
2017-02-13 20:43:20 +00:00
|
|
|
- url: http://remote2/push
|
2019-12-12 20:47:23 +00:00
|
|
|
name: rw_tls
|
2019-03-12 10:24:15 +00:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2021-02-04 21:18:13 +00:00
|
|
|
headers:
|
|
|
|
name: value
|
2016-10-01 15:42:43 +00:00
|
|
|
|
2017-10-18 11:08:14 +00:00
|
|
|
remote_read:
|
|
|
|
- url: http://remote1/read
|
|
|
|
read_recent: true
|
2019-12-12 20:47:23 +00:00
|
|
|
name: default
|
2022-03-30 10:49:03 +00:00
|
|
|
enable_http2: false
|
2017-10-18 11:08:14 +00:00
|
|
|
- url: http://remote3/read
|
|
|
|
read_recent: false
|
2019-12-12 20:47:23 +00:00
|
|
|
name: read_special
|
2017-11-12 01:23:20 +00:00
|
|
|
required_matchers:
|
|
|
|
job: special
|
2019-03-12 10:24:15 +00:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2017-10-18 11:08:14 +00:00
|
|
|
|
2015-05-07 08:55:03 +00:00
|
|
|
scrape_configs:
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: prometheus
|
|
|
|
|
|
|
|
honor_labels: true
|
|
|
|
# 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'.
|
|
|
|
|
|
|
|
file_sd_configs:
|
|
|
|
- files:
|
|
|
|
- foo/*.slow.json
|
|
|
|
- foo/*.slow.yml
|
|
|
|
- single/file.yml
|
|
|
|
refresh_interval: 10m
|
|
|
|
- files:
|
|
|
|
- bar/*.yaml
|
2015-07-22 15:48:22 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
static_configs:
|
|
|
|
- targets: ["localhost:9090", "localhost:9191"]
|
|
|
|
labels:
|
|
|
|
my: label
|
|
|
|
your: label
|
|
|
|
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [job, __meta_dns_name]
|
|
|
|
regex: (.*)some-[regex]
|
|
|
|
target_label: job
|
|
|
|
replacement: foo-${1}
|
|
|
|
# action defaults to 'replace'
|
|
|
|
- source_labels: [abc]
|
|
|
|
target_label: cde
|
|
|
|
- replacement: static
|
|
|
|
target_label: abc
|
|
|
|
- regex:
|
|
|
|
replacement: static
|
|
|
|
target_label: abc
|
2022-11-10 13:17:47 +00:00
|
|
|
- source_labels: [foo]
|
|
|
|
target_label: abc
|
|
|
|
action: keepequal
|
|
|
|
- source_labels: [foo]
|
|
|
|
target_label: abc
|
|
|
|
action: dropequal
|
2021-06-12 10:47:47 +00:00
|
|
|
|
|
|
|
authorization:
|
|
|
|
credentials_file: valid_token_file
|
|
|
|
|
2022-04-20 07:57:53 +00:00
|
|
|
tls_config:
|
|
|
|
min_version: TLS10
|
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: service-x
|
|
|
|
|
|
|
|
basic_auth:
|
|
|
|
username: admin_name
|
|
|
|
password: "multiline\nmysecret\ntest"
|
2016-10-18 22:19:19 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
scrape_interval: 50s
|
|
|
|
scrape_timeout: 5s
|
2023-10-10 10:16:55 +00:00
|
|
|
scrape_protocols: ["PrometheusText0.0.4"]
|
2015-07-22 15:48:22 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
body_size_limit: 10MB
|
|
|
|
sample_limit: 1000
|
2023-05-30 08:22:23 +00:00
|
|
|
target_limit: 35
|
|
|
|
label_limit: 35
|
|
|
|
label_name_length_limit: 210
|
|
|
|
label_value_length_limit: 210
|
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
metrics_path: /my_path
|
|
|
|
scheme: https
|
2015-07-18 21:23:58 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
dns_sd_configs:
|
|
|
|
- refresh_interval: 15s
|
|
|
|
names:
|
|
|
|
- first.dns.address.domain.com
|
|
|
|
- second.dns.address.domain.com
|
|
|
|
- names:
|
|
|
|
- first.dns.address.domain.com
|
|
|
|
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [job]
|
|
|
|
regex: (.*)some-[regex]
|
|
|
|
action: drop
|
|
|
|
- source_labels: [__address__]
|
|
|
|
modulus: 8
|
|
|
|
target_label: __tmp_hash
|
|
|
|
action: hashmod
|
|
|
|
- source_labels: [__tmp_hash]
|
|
|
|
regex: 1
|
|
|
|
action: keep
|
|
|
|
- action: labelmap
|
|
|
|
regex: 1
|
|
|
|
- action: labeldrop
|
|
|
|
regex: d
|
|
|
|
- action: labelkeep
|
|
|
|
regex: k
|
|
|
|
|
|
|
|
metric_relabel_configs:
|
|
|
|
- source_labels: [__name__]
|
|
|
|
regex: expensive_metric.*
|
|
|
|
action: drop
|
|
|
|
|
|
|
|
- job_name: service-y
|
|
|
|
|
|
|
|
consul_sd_configs:
|
|
|
|
- server: "localhost:1234"
|
|
|
|
token: mysecret
|
2023-05-16 22:14:58 +00:00
|
|
|
path_prefix: /consul
|
2021-06-12 10:47:47 +00:00
|
|
|
services: ["nginx", "cache", "mysql"]
|
|
|
|
tags: ["canary", "v1"]
|
|
|
|
node_meta:
|
|
|
|
rack: "123"
|
|
|
|
allow_stale: true
|
|
|
|
scheme: https
|
|
|
|
tls_config:
|
|
|
|
ca_file: valid_ca_file
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
|
|
|
insecure_skip_verify: false
|
|
|
|
|
|
|
|
relabel_configs:
|
|
|
|
- source_labels: [__meta_sd_consul_tags]
|
|
|
|
separator: ","
|
|
|
|
regex: label:([^=]+)=([^,]+)
|
|
|
|
target_label: ${1}
|
|
|
|
replacement: ${2}
|
|
|
|
|
|
|
|
- job_name: service-z
|
2015-07-18 21:23:58 +00:00
|
|
|
|
2019-03-12 10:24:15 +00:00
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2015-10-23 15:47:10 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
authorization:
|
|
|
|
credentials: mysecret
|
2015-09-02 13:08:37 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: service-kubernetes
|
2017-04-19 12:36:34 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
kubernetes_sd_configs:
|
|
|
|
- role: endpoints
|
|
|
|
api_server: "https://localhost:1234"
|
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2017-04-19 12:36:34 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
basic_auth:
|
|
|
|
username: "myusername"
|
|
|
|
password: "mysecret"
|
2019-03-12 10:24:15 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: service-kubernetes-namespaces
|
2019-03-12 10:24:15 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
kubernetes_sd_configs:
|
|
|
|
- role: endpoints
|
|
|
|
api_server: "https://localhost:1234"
|
|
|
|
namespaces:
|
|
|
|
names:
|
|
|
|
- default
|
2016-09-29 12:57:28 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
basic_auth:
|
|
|
|
username: "myusername"
|
|
|
|
password_file: valid_password_file
|
|
|
|
|
2021-05-04 19:47:44 +00:00
|
|
|
- job_name: service-kuma
|
|
|
|
|
|
|
|
kuma_sd_configs:
|
|
|
|
- server: http://kuma-control-plane.kuma-system.svc:5676
|
2023-12-11 16:01:52 +00:00
|
|
|
client_id: main-prometheus
|
2021-05-04 19:47:44 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: service-marathon
|
|
|
|
marathon_sd_configs:
|
|
|
|
- servers:
|
|
|
|
- "https://marathon.example.com:443"
|
|
|
|
|
|
|
|
auth_token: "mysecret"
|
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
|
|
|
|
2022-06-25 20:47:42 +00:00
|
|
|
- job_name: service-nomad
|
|
|
|
nomad_sd_configs:
|
|
|
|
- server: 'http://localhost:4646'
|
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: service-ec2
|
|
|
|
ec2_sd_configs:
|
|
|
|
- region: us-east-1
|
|
|
|
access_key: access
|
|
|
|
secret_key: mysecret
|
|
|
|
profile: profile
|
|
|
|
filters:
|
|
|
|
- name: tag:environment
|
|
|
|
values:
|
|
|
|
- prod
|
|
|
|
|
|
|
|
- name: tag:service
|
|
|
|
values:
|
|
|
|
- web
|
|
|
|
- db
|
|
|
|
|
|
|
|
- job_name: service-lightsail
|
|
|
|
lightsail_sd_configs:
|
|
|
|
- region: us-east-1
|
|
|
|
access_key: access
|
|
|
|
secret_key: mysecret
|
|
|
|
profile: profile
|
|
|
|
|
|
|
|
- job_name: service-azure
|
|
|
|
azure_sd_configs:
|
|
|
|
- environment: AzurePublicCloud
|
|
|
|
authentication_method: OAuth
|
|
|
|
subscription_id: 11AAAA11-A11A-111A-A111-1111A1111A11
|
2022-03-28 23:21:23 +00:00
|
|
|
resource_group: my-resource-group
|
2021-06-12 10:47:47 +00:00
|
|
|
tenant_id: BBBB222B-B2B2-2B22-B222-2BB2222BB2B2
|
|
|
|
client_id: 333333CC-3C33-3333-CCC3-33C3CCCCC33C
|
|
|
|
client_secret: mysecret
|
|
|
|
port: 9100
|
|
|
|
|
|
|
|
- job_name: service-nerve
|
|
|
|
nerve_sd_configs:
|
|
|
|
- servers:
|
|
|
|
- localhost
|
|
|
|
paths:
|
|
|
|
- /monitoring
|
|
|
|
|
|
|
|
- job_name: 0123service-xxx
|
|
|
|
metrics_path: /metrics
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- localhost:9090
|
2015-09-21 18:49:19 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: badfederation
|
|
|
|
honor_timestamps: false
|
|
|
|
metrics_path: /federate
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- localhost:9090
|
2016-12-28 02:16:47 +00:00
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: 測試
|
|
|
|
metrics_path: /metrics
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- localhost:9090
|
|
|
|
|
|
|
|
- job_name: httpsd
|
|
|
|
http_sd_configs:
|
|
|
|
- url: "http://example.com/prometheus"
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
|
|
|
|
|
|
|
- job_name: digitalocean-droplets
|
|
|
|
digitalocean_sd_configs:
|
|
|
|
- authorization:
|
|
|
|
credentials: abcdef
|
|
|
|
|
|
|
|
- job_name: docker
|
|
|
|
docker_sd_configs:
|
|
|
|
- host: unix:///var/run/docker.sock
|
|
|
|
|
|
|
|
- job_name: dockerswarm
|
|
|
|
dockerswarm_sd_configs:
|
|
|
|
- host: http://127.0.0.1:2375
|
|
|
|
role: nodes
|
|
|
|
|
|
|
|
- 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
|
2021-06-01 12:04:58 +00:00
|
|
|
|
|
|
|
- job_name: service-puppetdb
|
|
|
|
puppetdb_sd_configs:
|
|
|
|
- url: https://puppetserver/
|
|
|
|
query: 'resources { type = "Package" and title = "httpd" }'
|
|
|
|
include_parameters: true
|
|
|
|
port: 80
|
|
|
|
refresh_interval: 1m
|
|
|
|
tls_config:
|
|
|
|
ca_file: valid_ca_file
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
2021-06-12 10:47:47 +00:00
|
|
|
|
|
|
|
- job_name: hetzner
|
2022-05-03 08:09:53 +00:00
|
|
|
relabel_configs:
|
|
|
|
- action: uppercase
|
|
|
|
source_labels: [instance]
|
|
|
|
target_label: instance
|
2021-06-12 10:47:47 +00:00
|
|
|
hetzner_sd_configs:
|
|
|
|
- role: hcloud
|
|
|
|
authorization:
|
|
|
|
credentials: abcdef
|
|
|
|
- role: robot
|
|
|
|
basic_auth:
|
|
|
|
username: abcdef
|
|
|
|
password: abcdef
|
|
|
|
|
|
|
|
- job_name: service-eureka
|
|
|
|
eureka_sd_configs:
|
|
|
|
- server: "http://eureka.example.com:8761/eureka"
|
|
|
|
|
2022-11-03 09:20:09 +00:00
|
|
|
- job_name: ovhcloud
|
|
|
|
ovhcloud_sd_configs:
|
|
|
|
- service: vps
|
|
|
|
endpoint: ovh-eu
|
|
|
|
application_key: testAppKey
|
|
|
|
application_secret: testAppSecret
|
|
|
|
consumer_key: testConsumerKey
|
|
|
|
refresh_interval: 1m
|
|
|
|
- service: dedicated_server
|
|
|
|
endpoint: ovh-eu
|
|
|
|
application_key: testAppKey
|
|
|
|
application_secret: testAppSecret
|
|
|
|
consumer_key: testConsumerKey
|
|
|
|
refresh_interval: 1m
|
|
|
|
|
2021-06-12 10:47:47 +00:00
|
|
|
- job_name: scaleway
|
|
|
|
scaleway_sd_configs:
|
|
|
|
- role: instance
|
|
|
|
project_id: 11111111-1111-1111-1111-111111111112
|
|
|
|
access_key: SCWXXXXXXXXXXXXXXXXX
|
|
|
|
secret_key: 11111111-1111-1111-1111-111111111111
|
|
|
|
- role: baremetal
|
|
|
|
project_id: 11111111-1111-1111-1111-111111111112
|
|
|
|
access_key: SCWXXXXXXXXXXXXXXXXX
|
|
|
|
secret_key: 11111111-1111-1111-1111-111111111111
|
|
|
|
|
|
|
|
- job_name: linode-instances
|
|
|
|
linode_sd_configs:
|
|
|
|
- authorization:
|
|
|
|
credentials: abcdef
|
2021-06-01 18:32:36 +00:00
|
|
|
|
2021-10-18 23:00:44 +00:00
|
|
|
- job_name: uyuni
|
|
|
|
uyuni_sd_configs:
|
|
|
|
- server: https://localhost:1234
|
|
|
|
username: gopher
|
|
|
|
password: hole
|
|
|
|
|
2022-05-20 12:57:23 +00:00
|
|
|
- job_name: ionos
|
|
|
|
ionos_sd_configs:
|
|
|
|
- datacenter_id: 8feda53f-15f0-447f-badf-ebe32dad2fc0
|
|
|
|
authorization:
|
|
|
|
credentials: abcdef
|
|
|
|
|
2022-05-24 16:03:49 +00:00
|
|
|
- job_name: vultr
|
|
|
|
vultr_sd_configs:
|
|
|
|
- authorization:
|
|
|
|
credentials: abcdef
|
|
|
|
|
2016-11-23 11:42:33 +00:00
|
|
|
alerting:
|
|
|
|
alertmanagers:
|
2021-06-12 10:47:47 +00:00
|
|
|
- scheme: https
|
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- "1.2.3.4:9093"
|
|
|
|
- "1.2.3.5:9093"
|
|
|
|
- "1.2.3.6:9093"
|
2022-01-25 10:08:04 +00:00
|
|
|
|
2022-09-28 14:31:21 +00:00
|
|
|
storage:
|
|
|
|
tsdb:
|
|
|
|
out_of_order_time_window: 30m
|
|
|
|
|
2022-01-25 10:08:04 +00:00
|
|
|
tracing:
|
|
|
|
endpoint: "localhost:4317"
|
|
|
|
client_type: "grpc"
|
2022-02-22 16:07:30 +00:00
|
|
|
headers:
|
|
|
|
foo: "bar"
|
|
|
|
timeout: 5s
|
|
|
|
compression: "gzip"
|
|
|
|
tls_config:
|
|
|
|
cert_file: valid_cert_file
|
|
|
|
key_file: valid_key_file
|
|
|
|
insecure_skip_verify: true
|