-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
61 lines (59 loc) · 1.55 KB
/
docker-compose.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: '3'
services:
cloud_dns_exporter:
image: registry.cn-hangzhou.aliyuncs.com/eryajf/cloud_dns_exporter:latest
container_name: cloud_dns_exporter
ports:
- "21798:21798"
configs:
- source: cloud_dns_exporter_config
target: /app/config.yaml
environment:
- TZ=Asia/Shanghai
grafana:
image: bitnami/grafana:11.2.0
container_name: grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin #设置admin用户默认密码
- TZ=Asia/Shanghai
ports:
- "3000:3000"
volumes:
- grafana_data:/opt/bitnami/grafana/data
prometheus:
image: bitnami/prometheus:2.54.1
container_name: prometheus
environment:
- TZ=Asia/Shanghai
ports:
- "9090:9090"
configs:
- source: prometheus_config
target: /opt/bitnami/prometheus/conf/prometheus.yml
volumes:
- prometheus_data:/opt/bitnami/prometheus/data
# 示例配置
configs:
# 云解析配置,以阿里云DNS为例
cloud_dns_exporter_config:
content: |
cloud_providers:
aliyun:
accounts:
- name: a1
secretId: "your cloud dns accessKey"
secretKey: "your cloud dns secretKey"
# prometheus配置示例(无需修改)
prometheus_config:
content: |
scrape_configs:
- job_name: 'cloud_dns_exporter'
metrics_path: 'metrics'
scrape_interval: 15s
static_configs:
- targets: ['cloud_dns_exporter:21798']
volumes:
grafana_data:
driver: local
prometheus_data:
driver: local