采用Prometheus+Grafana+AlertManager作为监控组件
使用docker-compose快速搭建测试环境
version: "3"
services:
prometheus:
image: prom/prometheus
container_name: prometheus
user: root
ports:
- "9090:9090"
volumes:
- /root/prometheus:/etc/prometheus
- /root/prometheus/prometheus_db:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yaml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.enable-lifecycle'
networks:
- net-prometheus
grafana:
image: grafana/grafana
container_name: grafana
user: root
ports:
- "3000:3000"
volumes:
- ./data/prometheus/grafana_data:/var/lib/grafana
depends_on:
- prometheus
networks:
- net-prometheus
alertmanager:
image: prom/alertmanager
hostname: alertmanager
container_name: alertmanager
user: root
ports:
- "9093:9093"
volumes:
- ./data/prometheus/alertmanager_data:/var/lib/alertmanager
command:
- '--storage.path=/var/lib/alertmanager/data/'
- '--config.file=/var/lib/alertmanager/alertmanager.yaml'
networks:
net-prometheus:
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。