零 整体调用链
   1 linux安装alertmanager模块 
   2 配置alert.yml 里面主要定义报警级别和相关频率,并填写webhook的api
   3 利用flask框架编写webhook模块,主要包含两方面 1 是各种报警方式 2 是在不同问题级别对报警方式的调用
   4 在prometheus配置文件中进行alert设置绑定
   5 在prometheus容器中进行rule配置
   6 在grafana中进行alert数据源绑定
一 物理机
1 安装alertmanager模块
    2 alert.yml 修改 见后面文章
    3  nohup ./alertmanager --config.file=alert.yml  启动
二  容器内
  1 prometheus.yml
     alerting:
       alertmanagers:
         - static_configs:
         - targets:
            -IP:PORT
      scheme: http
      timeout: 10s
  rule_files:
     - /etc/rules/rules.yml
2 rules.yml的编写 见后面文章
3 需要重启 prometheus
4 报警格式
   报警监控有两种 1 种是自定义的报警格式 flask实现 2另一种是rules的编写规则实现
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-06-21
  • 2022-01-22
  • 2022-12-23
  • 2021-10-20
  • 2021-06-06
猜你喜欢
  • 2021-06-24
  • 2022-01-19
  • 2021-11-17
  • 2022-01-10
  • 2022-01-26
  • 2022-12-23
  • 2021-08-17
相关资源
相似解决方案