环境
系统:CentOS 7.5
软件:alertmanager-0.15.1.linux-amd64.tar.gz
安装
下载二进制包
地址:https://prometheus.io/download/-
安装
# tar -xzvf alertmanager-0.15.1.linux-amd64.tar.gz # mkdir /usr/local/prometheus # mv alertmanager-0.15.1.linux-amd64 /usr/local/prometheus/alertmanager
-
创建数据目录
# mkdir -p /data/prometheus/alertmanager/data
-
创建用户并授权
# useradd prometheus # chown -R prometheus:prometheus /usr/local/prometheus /data/prometheus
启动
-
添加启动服务
# vim /usr/lib/systemd/system/alertmanager.service [Unit] Description=Alertmanager After=network.target [Service] Type=simple User=prometheus ExecStart=/usr/local/prometheus/alertmanager/alertmanager --config.file=/usr/local/prometheus/alertmanager/alertmanager.yml --storage.path=/data/prometheus/alertmanager/data Restart=on-failure [Install] WantedBy=multi-user.target
-
启动
# systemctl enable alertmanager.service # systemctl start alertmanager.service
访问
地址:http://ip:9093