-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig-example.yml
41 lines (41 loc) · 1.01 KB
/
config-example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
exporter:
compose_file: docker-compose-example.yml
container: exporter
exporter_host: 127.0.0.1 #默认值
exporter_port: 9601 #要求提供docker-compose暴露的exporter端口
wait: 1s
path: /metrics
allow_empty: false
disallowed_metrics:
- example_metric
metrics:
- name: pg_up
type: gauge
samples:
- value: 1
- name: pg_exporter_scrapes_total
type: counter
disallowed_labels:
- not_exist
- name: pg_database_size_bytes
labels:
- datname
samples:
- labels:
datname: example
- name: go_gc_duration_seconds
type: summary
hooks:
- name: on-the-machine
setup:
- echo "setup on the machine"
teardown:
- echo "teardown on the machine"
- name: in-the-container
container: postgres
setup:
- echo "setup in the container"
- sleep 3s
- psql heracles mrlyc -c 'CREATE DATABASE example;'
teardown:
- echo "teardown in the container"