Installing Alertmanager from Scratch

Introduction

This guide walks you through installing Prometheus Alertmanager from scratch on a Linux system to handle alert notifications efficiently.

Step 1: Download Alertmanager

Visit the official Prometheus download page and download the latest Alertmanager release for your system.

wget https://github.com/prometheus/alertmanager/releases/download/v0.25.0/alertmanager-0.25.0.linux-amd64.tar.gz
tar xvf alertmanager-0.25.0.linux-amd64.tar.gz
cd alertmanager-0.25.0.linux-amd64
            
Step 2: Configure Alertmanager

Create a basic configuration file alertmanager.yml to define alert routing and receivers:

global:
  resolve_timeout: 5m

route:
  receiver: 'team-email'

receivers:
  - name: 'team-email'
    email_configs:
      - to: '[email protected]'
Step 3: Run Alertmanager

Start Alertmanager using the configuration file:

./alertmanager --config.file=alertmanager.yml

By default, Alertmanager listens on port 9093.

Step 4: Integrate with Prometheus

Add Alertmanager’s address to your Prometheus configuration (prometheus.yml):

alerting:
  alertmanagers:
    - static_configs:
        - targets:
          - localhost:9093
            

Reload Prometheus to apply changes.

Step 5: Verify Alertmanager UI

Open http://localhost:9093 in your browser to access the Alertmanager web UI and view alerts and silences.

Summary

Following these steps, you’ll have a basic Alertmanager installation running and integrated with Prometheus, ready to handle alert notifications.