Skip to main content
In this guide, you’ll install Alertmanager on a Linux VM and configure it to send alerts directly to Slack. We’ll cover downloading the binary, inspecting defaults, setting up Slack webhooks, and reloading Alertmanager without downtime.

Prerequisites

  • A Linux VM with internet access
  • wget, tar, and curl installed
  • A Slack workspace with permissions to create Incoming Webhooks

1. Download and Extract Alertmanager

Download the latest Alertmanager release (v0.22.2) and unpack it:
Change into the directory and verify the contents:
Expected output:

2. Inspect the Default Configuration

Open alertmanager.yml to review the default routing and inhibition settings:

3. Start Alertmanager

Launch Alertmanager and confirm it listens on port 9093:
You should see logs like:
Open your browser at http://<VM_PUBLIC_DNS>:9093 to verify the UI.

4. Configure Slack Notifications

To route alerts to Slack, update alertmanager.yml with your workspace’s Incoming Webhook URL.
Refer to the official Prometheus Alertmanager documentation for complete configuration options and notification templates.
The image shows a webpage from the Prometheus documentation, specifically focusing on the configuration of Alertmanager. It includes a navigation menu on the left and detailed configuration instructions on the right.
The image shows a webpage from the Prometheus documentation, specifically the "Notification Template Reference" section. It includes information about data structures and notification templates used in Alertmanager.
Below is a sample Slack configuration—replace <YOUR_SLACK_WEBHOOK_URL> with your actual webhook URL and adjust the channel as needed:

Create a Slack Incoming Webhook

  1. In Slack, Create an App (e.g., “Prometheus Alerting”).
  2. Enable Incoming Webhooks and add a webhook to your target channel.
  3. Copy the generated URL and insert it in both slack_api_url and api_url above.
  4. Save alertmanager.yml.

5. Reload Alertmanager Configuration

Reload without downtime by sending an HTTP POST:
Refresh the UI (http://<VM_PUBLIC_DNS>:9093) to confirm your Slack receiver is active.

Next Steps

  • Configure Prometheus to forward alerts to Alertmanager
  • Define custom alerting rules in Prometheus
  • Explore advanced routing and inhibition in Alertmanager

Watch Video