surroundings
System: CentOS 7
software: alertmanager-0.18.0.linux-amd64.tar.gz
installation
-
Download the binary package
Address: https://prometheus.io/download/ -
installation
# 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
-
Create a data directory
# mkdir -p /data/prometheus/alertmanager/data
-
Create a user and authorization
# useradd prometheus # chown -R prometheus:prometheus /usr/local/prometheus /data/prometheus
start up
-
Add to start the service
# 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
-
start up
# systemctl enable alertmanager.service # systemctl start alertmanager.service
-
Access
Address:http://ip:9093