- Monitoring systems need an efficient way to handle and notify alerts in real time.
- Prometheus generates alerts, but it relies on Alertmanager to process and deliver them.
- Alertmanager helps in grouping, deduplicating, and routing alerts to different channels like email or Slack.
- Setting up Alertmanager on Ubuntu 24.04 ensures a reliable and scalable alerting system.
- This guide walks through installing, configuring, and integrating Alertmanager with Prometheus,Installing alert manager on Ubuntu.
Download Alertmanager
cd /tmp
wget https://github.com/prometheus/alertmanager/releases/latest/download/alertmanager-*.linux-amd64.tar.gz
tar -xvf alertmanager-*.tar.gz
cd alertmanager-*.linux-amd64
Move binaries
sudo mv alertmanager /usr/local/bin/
sudo mv amtool /usr/local/bin/
alertmanager –version
Create system user
sudo useradd --no-create-home --shell /bin/false alertmanager
Create directories
sudo mkdir /etc/alertmanager
sudo mkdir /var/lib/alertmanager
sudo chown alertmanager:alertmanager /etc/alertmanager
sudo chown alertmanager:alertmanager /var/lib/alertmanager
Create systemd service
vim /etc/systemd/system/alertmanager.service
[Unit]
Description=Alertmanager
After=network.target
[Service]
User=alertmanager
Group=alertmanager
Type=simple
ExecStart=/usr/local/bin/alertmanager \
--config.file=/etc/alertmanager/alertmanager.yml \
--storage.path=/var/lib/alertmanager
[Install]
WantedBy=multi-user.target
Start Alertmanager
sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl enable alertmanager
sudo systemctl start alertmanager
Check status:
sudo systemctl status alertmanager
Access UI
Open in browser:
http://<your-server-ip>:9093
You should see Alertmanager dashboard
Connect Prometheus to Alertmanager
Edit Prometheus config:
vim /etc/prometheus/prometheus.yml
Add:
alerting:
alertmanagers:
- static_configs:
- targets:
- localhost:9093
Restart Prometheus:
systemctl restart prometheus
Alertmanager is a critical component for managing alerts efficiently in a monitoring setup.
Integrating it with Prometheus enables automated and organized alert handling.
Conclusion
If you need expert assistance with installing Alert Manager on Ubuntu, our team is here to help. At Skynats, we specialize in Linux Server Management services, ensuring seamless setup, configuration, and 24/7 monitoring for your infrastructure. From installation to optimization, our experts handle everything so you can focus on your business. Contact us today to get reliable, hassle-free server management support tailored to your needs.