Prometheus 与 Alertmanager 通信

1、编辑Prometheus配置文件配置连接地址:vim prometheus.yml

# Alertmanager configuration
alerting:
  alertmanagers:
  - static_configs:
    - targets:
      # alertmanager 地址
      - 127.0.0.1:9093

2、编辑Prometheus配置文件配置,开启告警配置文件:vim prometheus.yml

# Load rules once and periodically evaluate them according to the global
rule_files:
  # 告警规则配置文件位置
  - "rules/*.yml"

3、创建告警规则目录

mkdir rules

4、检查并重新加载配置文件

./promtool check config prometheus.yml
kill -hup PID

 

相关文章:

  • 2022-01-01
  • 2021-09-03
  • 2021-07-09
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2021-09-06
  • 2021-09-03
  • 2021-08-20
相关资源
相似解决方案