Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Installing Prometheus Alertmanager

Prometheus alerts allow you to issue automated notifications when certain events occur, triggered by your metric data. Alertmanager is a necessary component in this process, handling the process of sending alerts to the appropriate destination, as well as adding some additional control over alerting functionality. In this lab, you will have the opportunity to install and configure an Alertmanager instance, and connect it to an existing Prometheus server.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 13, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Install Alertmanager
    1. Log in to the Prometheus server.

    2. Create a user and group for Alertmanager:

      sudo useradd -M -r -s /bin/false alertmanager
      
    3. Download and install the Alertmanager binaries:

      wget https://github.com/prometheus/alertmanager/releases/download/v0.20.0/alertmanager-0.20.0.linux-amd64.tar.gz
      
      tar xvfz alertmanager-0.20.0.linux-amd64.tar.gz
      
      sudo cp alertmanager-0.20.0.linux-amd64/alertmanager /usr/local/bin/
      
      sudo chown alertmanager:alertmanager /usr/local/bin/alertmanager
      
      sudo mkdir -p /etc/alertmanager
      
      sudo cp alertmanager-0.20.0.linux-amd64/alertmanager.yml /etc/alertmanager
      
      sudo chown -R alertmanager:alertmanager /etc/alertmanager
      
      sudo mkdir -p /var/lib/alertmanager
      
      sudo chown alertmanager:alertmanager /var/lib/alertmanager
      
    4. Create a systemd unit for Alertmanager:

      sudo vi /etc/systemd/system/alertmanager.service
      
      [Unit]
      Description=Prometheus Alertmanager
      Wants=network-online.target
      After=network-online.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
      
    5. Start and enable the alertmanager service:

      sudo systemctl enable alertmanager
      
      sudo systemctl start alertmanager
      
    6. Verify the service is running and you can reach it:

      sudo systemctl status alertmanager
      
      curl localhost:9093
      
    7. You can also access Alertmanager in a web browser at http://<PROMETHEUS_SERVER_PUBLIC_IP>:9093.

  2. Challenge

    Install `amtool`
    1. Install the amtool binary:

      sudo cp alertmanager-0.20.0.linux-amd64/amtool /usr/local/bin/
      
    2. Create a config file for amtool:

      sudo mkdir -p /etc/amtool
      
      sudo vi /etc/amtool/config.yml
      
    3. Enter the following content in the config file:

      alertmanager.url: http://localhost:9093
      
    4. Verify amtool is working by pulling the current Alertmanager configuration:

      amtool config show
      
  3. Challenge

    Configure Prometheus to Use Alertmanager
    1. Edit the Prometheus config:

      sudo vi /etc/prometheus/prometheus.yml
      
    2. Under alerting, add your Alertmanager as a target:

      alerting:
        alertmanagers:
        - static_configs:
          - targets: ["localhost:9093"]
      
    3. Restart Prometheus to reload the configuration:

      sudo systemctl restart prometheus
      
    4. Verify Prometheus is able to reach the Alertmanager. Access the Prometheus Expression Browser in a web browser at http://<PROMETHEUS_SERVER_PUBLIC_IP>:9090/graph. Run the following query and ensure the current value is 1:

      prometheus_notifications_alertmanagers_discovered
      
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight