1.拉取镜像
docker pull prom/alertmanager
2.docker-compose.yml文件
version: "3" alertmanager: image: "prom/alertmanager" hostname: alertmanager container_name: alertmanager ports: - '9093:9093' #command: -config.file=/etc/alertmanager/alertmanager.yml volumes: - ./alertmanager/etc/config.yml:/etc/alertmanager/config.yml restart: always
route: group_by: ['alertname'] group_wait: 30s group_interval: 5m repeat_interval: 1h receiver: 'web.hook' receivers: - name: 'web.hook' webhook_configs: - url: 'http://127.0.0.1:5001/' inhibit_rules: - source_match: severity: 'critical' target_match: severity: 'warning' equal: ['alertname', 'dev', 'instance']
3.启动
docker-compose up -d
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)