AlertManger集群的搭建

参考博客:https://www.cnblogs.com/shhnwangjian/p/10703292.html

Alertmanager 集群搭建

环境准备:2台主机 (centos 7)

192.168.31.151

192.168.31.144

 1、安装部署 192.168.31.151

1
2
3
4
5
6
7
8
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/

2、启动命令

1
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 &

3、安装部署192.168.31.144

1
2
3
4
5
6
7
8
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/

4、启动命令

1
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 &

5、修改prometheus配置

6、reload

1
curl -X POST http://127.0.0.1:9090/-/reload

posted on 2021-12-02 18:43  luzhouxiaoshuai  阅读(160)  评论(0编辑  收藏  举报

导航