環境準備:2臺主機 (centos 7)linux
192.168.31.151centos
192.168.31.144bash
一、安裝部署 192.168.31.151curl
cd /usr/local tar -xvf alertmanager-0.16.2.linux-amd64.tar.gz ln -s alertmanager-0.16.2.linux-amd64 /usr/local/alertmanager cd /usr/local/alertmanager mkdir bin conf data mv alertmanager ./bin/ mv amtool ./bin/ mv alertmanager.yml ./conf/
二、啓動命令url
nohup /usr/local/alertmanager/bin/alertmanager --config.file=/usr/local/alertmanager/conf/alertmanager.yml --storage.path=/usr/local/alertmanager/data --cluster.listen-address=0.0.0.0:9094 --cluster.peer 192.168.31.144:9094 > alertmanager.out 2>&1 &
三、安裝部署192.168.31.144spa
cd /usr/local tar -xvf alertmanager-0.16.2.linux-amd64.tar.gz ln -s alertmanager-0.16.2.linux-amd64 /usr/local/alertmanager cd /usr/local/alertmanager mkdir bin conf data mv alertmanager ./bin/ mv amtool ./bin/ mv alertmanager.yml ./conf/
四、啓動命令3d
nohup /usr/local/alertmanager/bin/alertmanager --config.file=/usr/local/alertmanager/conf/alertmanager.yml --storage.path=/usr/local/alertmanager/data --cluster.listen-address=0.0.0.0:9094 --cluster.peer 192.168.31.151:9094 > alertmanager.out 2>&1 &
五、修改prometheus配置blog
alerting: alertmanagers: - static_configs: - targets: - 192.168.31.151:9093 - 192.168.31.144:9093
六、reload部署
curl -X POST http://127.0.0.1:9090/-/reload