docker安装AlertManager

docker安装AlertManager,第1张

docker安装AlertManager

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

3.alertmanager.yml默认配置

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

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5504146.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-13
下一篇 2022-12-13

发表评论

登录后才能评论

评论列表(0条)

保存