-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
69 lines (65 loc) · 2.05 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
69 lines (65 loc) · 2.05 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3.8"
services:
# YACE - 补 3 项 OS 指标 (CPU/内存/磁盘, mysqld_exporter 无法获取)
yace:
image: ghcr.io/nerdswords/yet-another-cloudwatch-exporter:v0.62.0
container_name: yace
restart: unless-stopped
ports:
- "5000:5000"
volumes:
- ./yace-config.yaml:/tmp/config.yml:ro
environment:
- AWS_REGION=us-east-1
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
command:
- --config.file=/tmp/config.yml
- --listen-address=:5000
- --scraping-interval=60
# mysqld_exporter - 主力: 20 项引擎指标
mysqld-exporter:
image: prom/mysqld-exporter:v0.16.0
container_name: mysqld-exporter
restart: unless-stopped
ports:
- "9104:9104"
volumes:
- ./mysqld-exporter.cnf:/etc/.mysqld_exporter.cnf:ro
- ./global-bundle.pem:/etc/ssl/certs/global-bundle.pem:ro
environment:
MYSQLD_EXPORTER_PASSWORD: ${MYSQL_EXPORTER_PASSWORD}
command:
- --config.my-cnf=/etc/.mysqld_exporter.cnf
- --no-collect.info_schema.query_response_time
- --collect.global_status
- --collect.global_variables
- --collect.slave_status
- --collect.info_schema.innodb_metrics
- --collect.info_schema.processlist
- --collect.engine_innodb_status
- --collect.perf_schema.eventsstatements
- --collect.perf_schema.eventsstatementssum
- --collect.perf_schema.eventswaits
- --collect.perf_schema.tableiowaits
- --collect.perf_schema.tablelocks
- --collect.perf_schema.file_events
- --exporter.lock_wait_timeout=2
# Prometheus
prometheus:
image: prom/prometheus:v2.51.0
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.time=30d
depends_on:
- yace
- mysqld-exporter
volumes:
prometheus-data: