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
