1. 安装alertmanger
wget https://github.com/prometheus/alertmanager/releases/download/v0.21.0/alertmanager-0.21.0.linux-amd64.tar.gz tar -zxvf alertmanager-0.21.0.linux-amd64.tar.gz -C /usr/local cd /usr/local/alertmanager-0.21.0.linux-amd64
2. 启动
./alertmanger
3. 编写启动文件启动
[Unit] Description=alertmanager After=network.target [Service] Type=simple User=root Group=root WorkingDirectory=/usr/local/alertmanager ExecStart=/bin/sh -c '/usr/local/alertmanager/alertmanager --web.external-url=http://192.168.17.12:9093/ --log.level=debug >>/usr/local/alertmanager/alertmanager.log 2>&1 ' Restart=on-failure [Install] WantedBy=multi-user.target
4. 启动服务
systemctl daemon-reload && systemctl enable alertmanager.service && systemctl start alertmanager.service
标签:alertmanager,tar,安装,linux,usr,alertmanger,local From: https://www.cnblogs.com/zhuhaofeng/p/18521878