初始化prometheus全套配置
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.36.2
|
||||
container_name: prometheus
|
||||
volumes:
|
||||
- ./conf/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- ./conf/rules:/etc/prometheus/rules
|
||||
- prometheus_data:/prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
command:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
- "--web.enable-lifecycle"
|
||||
- "--storage.tsdb.retention.time=180d"
|
||||
- "--query.max-samples=2000000"
|
||||
restart: unless-stopped
|
||||
extra_hosts:
|
||||
- "master:10.0.0.87"
|
||||
- "node1:10.0.0.81"
|
||||
- "node2:10.0.0.82"
|
||||
|
||||
pushgateway:
|
||||
image: prom/pushgateway:v1.5.0
|
||||
container_name: pushgateway
|
||||
ports:
|
||||
- "9091:9091"
|
||||
restart: unless-stopped
|
||||
extra_hosts:
|
||||
- "master:10.0.0.87"
|
||||
- "node1:10.0.0.81"
|
||||
- "node2:10.0.0.82"
|
||||
|
||||
alertmanager:
|
||||
image: prom/alertmanager:v0.27.0
|
||||
container_name: alertmanager
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
|
||||
- ./alertmanager/templates:/etc/alertmanager/templates
|
||||
- alertmanager_data:/alertmanager
|
||||
- /etc/localtime:/etc/localtime
|
||||
- /etc/timezone:/etc/timezone
|
||||
command:
|
||||
- "--config.file=/etc/alertmanager/alertmanager.yml"
|
||||
- "--storage.path=/alertmanager"
|
||||
- "--storage.retention=148h"
|
||||
- "--cluster.listen-address="
|
||||
- "--cluster.advertise-address="
|
||||
cap_add:
|
||||
- CAP_SYS_TIME
|
||||
extra_hosts:
|
||||
- "master:10.0.0.87"
|
||||
- "node1:10.0.0.81"
|
||||
- "node2:10.0.0.82"
|
||||
|
||||
prometheus-alert:
|
||||
image: feiyu563/prometheus-alert:master
|
||||
container_name: prometheus-alert
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9094:8080"
|
||||
volumes:
|
||||
- prometheus_alert_data:/app
|
||||
environment:
|
||||
- PA_LOGIN_USER=alertuser
|
||||
- PA_LOGIN_PASSWORD=123456
|
||||
- PA_TITLE=prometheusAlert
|
||||
- PA_OPEN_FEISHU=1
|
||||
- PA_OPEN_DINGDING=0
|
||||
- PA_OPEN_WEIXIN=1
|
||||
extra_hosts:
|
||||
- "master:10.0.0.87"
|
||||
- "node1:10.0.0.81"
|
||||
- "node2:10.0.0.82"
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:9.1.2
|
||||
container_name: grafana
|
||||
network_mode: host
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=Advantest#1
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
restart: unless-stopped
|
||||
extra_hosts:
|
||||
- "master:10.0.0.87"
|
||||
- "node1:10.0.0.81"
|
||||
- "node2:10.0.0.82"
|
||||
|
||||
volumes:
|
||||
prometheus_data:
|
||||
prometheus_alert_data:
|
||||
alertmanager_data:
|
||||
grafana_data:
|
||||
Reference in New Issue
Block a user