标签:manager ofo 用户 pat simple exec service 启动 useradd
系统:CentOS 7
软件:alertmanager-0.18.0.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
prometheus+grafana+Alertmanager邮箱告警
标签:manager ofo 用户 pat simple exec service 启动 useradd
原文地址:https://www.cnblogs.com/JustinLau/p/11355705.html