Prometheus 与 Alertmanager 通信
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