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

Configuring Prometheus Alerts

Prometheus alerts allow you to issue real-time notifications triggered by your Prometheus metric data. In this lab, you will work directly with Prometheus alerts. You will create an alert in an existing Prometheus Server by modifying the Prometheus configuration.

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

Contact sales

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

    Create an Alerting Rule in Prometheus to Alert When the Server Goes Down
    1. Log in to the Prometheus server.

    2. Edit the Prometheus config file:

      sudo vi /etc/prometheus/prometheus.yml
      
    3. Add a path for rules files to the Prometheus config:

      rule_files:
        - "/etc/prometheus/rules/*.yml"
      
    4. Create the rules directory:

      sudo mkdir -p /etc/prometheus/rules/
      
    5. Create a new rules file for your alerting rule:

      sudo vi /etc/prometheus/rules/limedrop-web.yml
      
    6. Implement an alerting rule to issue an alert when the server goes down:

      groups:
      - name: limedrop-web
        rules:
        - alert: WebServerDown
          expr: up{instance="limedrop-web:9100"} == 0
          labels:
            severity: critical
          annotations:
            summary: Web Server Down
      
    7. Restart Prometheus to reload the configuration:

      sudo systemctl restart prometheus
      
    8. Access Prometheus in a browser at http://<PROMETHEUS_SERVER_PUBLIC_IP>:9090.

    9. Click Alerts. You should see your WebServerDown alert listed.

  2. Challenge

    Configure a Routing Tree and Receiver in Alertmanager
    1. Edit the Alertmanager configuration file:

      sudo vi /etc/alertmanager/alertmanager.yml
      
    2. Add a new node to the routing table:

      route:
      
        ...
      
        routes:
        - receiver: 'web.hook'
          group_wait: 30s
          match_re:
            alertname: WebServerDown
      
    3. Restart Alertmanager to reload the configuration:

      sudo systemctl restart alertmanager
      
    4. You can test your alert by shutting down the limedrop-web exporter to simulate the server going down. To do this, stop the limedrop_web_exporter service:

      sudo systemctl stop limedrop_web_exporter
      
    5. After a few moments, check the Alertmanager page in your browser: http://<PROMETHEUS_SERVER_PUBLIC_IP>:9093. If the alert is firing, you should see the WebServerDown alert appear.

    6. If you wish, you can start limedrop_web_exporter again and watch the alert disappear in Alertmanager:

      sudo systemctl start limedrop_web_exporter
      
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