How Alertmanager sends Prometheus alerts to Slack and Teams
Prometheus evaluates alert rules, but it does not send the message that reaches a person. Alertmanager receives firing alerts from Prometheus, groups related ones, removes duplicates, and routes each group to a receiver. Slack and Microsoft Teams are both delivered this way: each is a receiver defined in the Alertmanager configuration file, and a route decides which receiver gets which alerts. The receiver name, the route matchers and the options under each receiver are what your team actually configures, so treat them as the first thing to confirm. Field names and supported receiver types change between Alertmanager releases, so check them against the exact version you run before writing any configuration.
The Alertmanager documentation is the reference for every receiver field, including the Slack and Microsoft Teams options, their defaults and any deprecations. Read it for the version you deploy, not for the latest release, and record that version in your change record. Before building routes, decide who owns each receiver (a channel, a Teams workflow, an on-call tool), which labels such as team and severity route alerts to it, and what happens when a receiver fails. A chat webhook that silently stops accepting messages is a common cause of missed alerts, so plan a test alert and a check on delivery errors as part of the design.
DeployOpen plans and configures these routes inside your own infrastructure, including the Alertmanager instances, the secrets holding webhook URLs, and the templates that shape each message. Webhook URLs are credentials, so decide where they are stored, who can read them, and how they are rotated before the first receiver goes live. The team should also confirm which network path Alertmanager uses to reach Slack or Microsoft Teams, because many regulated networks restrict outbound traffic and the proxy settings must be agreed with the network team in advance.
What you need before wiring Slack and Teams receivers
Before any receiver is configured, four things need to be in place: a working Prometheus and Alertmanager pair, owners for the Slack and Teams sides, network paths from Alertmanager to the chat endpoints, and named owners for every route. Settling these first keeps the first test alert from stalling on access requests.
A working Prometheus and Alertmanager pair
Prometheus must evaluate rules and send alerts to Alertmanager before any chat receiver matters. Confirm that Prometheus lists Alertmanager in its alerting configuration, that the alerts page in the Prometheus UI shows rules firing, and that Alertmanager's own status page loads. Record the Alertmanager version you run, then check the Slack and Microsoft Teams receiver fields in the configuration reference for that exact version, because receiver options change between releases.
Alertmanager docsA Slack app or webhook owner
Someone must own the Slack side: either a Slack app with incoming webhooks enabled, or an incoming webhook created for a specific channel. Decide who creates the webhook URL, who can rotate it when a person leaves, and which workspace administrators must approve the app. The webhook URL is a credential, so store it in a secrets mechanism your team controls rather than in a shared configuration file.
A Teams workflow owner with webhook rights
Microsoft Teams alerts depend on a workflow or connector that your tenant allows. Confirm with the Microsoft 365 or Teams administrator that your account may create workflows in the target channel and that tenant policies permit the flow type you plan to use. The msteamsv2 receiver posts to the URL of that workflow, so the owner must be able to regenerate it if it is exposed or the flow is recreated.
Egress from Alertmanager to chat endpoints
Alertmanager must reach the Slack and Teams endpoints over HTTPS from the host or cluster where it runs. Many regulated networks route outbound traffic through a proxy or firewall that blocks unknown destinations. Ask the network team which chat endpoints are allowed, whether a proxy must be configured for Alertmanager, and whether TLS inspection changes certificate trust. Confirm this before testing, because a blocked send looks like a silent alerting failure.
Named channel and team owners per route
Each route in the Alertmanager configuration should send to a channel with a named owner who answers for it. Record the channel, the team that owns it, the on-call contact, and the severity levels it receives. Without this list, a routing change can send critical alerts to a channel nobody watches. Review the list when teams reorganize, since stale owners are a common cause of alerts that nobody acts on.
A test plan for secrets and routes
Plan a test that proves each receiver works before production traffic depends on it. Use a test label that routes only to a non-paging channel, send one synthetic alert, and confirm the message arrives in the right channel with the expected title and link. Check that a webhook URL never appears in logs, the Alertmanager status page, or version control. Record who approved the test so the evidence can be shown to reviewers later.
How an alert travels from Prometheus to a Slack channel or Teams workflow
The path starts with Prometheus evaluating alert rules and sending firing alerts to Alertmanager, which groups them and routes each one by its labels to a receiver. Each receiver posts to a Slack channel or a Teams workflow endpoint over an outbound connection that crosses the trust boundary of your cluster. Check where the webhook URLs are stored, who can read them, and that every Prometheus points at every Alertmanager instance.
Alert flow from Prometheus through Alertmanager receivers to Slack and Teams, with the outbound trust boundary marked.
Configuring Slack and Teams receivers in order
This sequence takes Alertmanager from no chat integration to a tested Slack channel and Teams workflow, with webhook secrets kept out of the main configuration file and each step closed by a check you can observe.
Create the Slack and Teams endpoints
The platform owner creates an incoming webhook for the Slack channel in the Slack app settings, and a workflow in Microsoft Teams that accepts webhook requests and posts into the target channel. Confirm which Slack app and Teams workflow owner is accountable for each endpoint, since rotating a URL later requires that person. Record each URL in your secrets inventory, not in a ticket or chat. The step is done when a test POST sent with curl from an approved host appears as a message in the channel.
Store webhook URLs outside the configuration
Webhook URLs act as credentials, so keep them out of the plain alertmanager.yml file that is copied between hosts and stored in version control. Place each URL in a file readable only by the Alertmanager service account, or inject it from your secrets manager at deploy time, and reference it from the configuration using the file or secret mechanism your Alertmanager version supports. Confirm the exact key names in the Alertmanager configuration reference for your running version. The check is that the file permissions are restricted and that a search of the repository finds no webhook URL.
Define one receiver per destination
Create a separate receiver for each destination, such as one Slack receiver per team channel and one msteamsv2 receiver per Teams workflow, using the receiver types confirmed for your Alertmanager release. Check the release notes for the Slack and msteamsv2 receiver options, since field names and template behavior can change between versions. Keep receiver names in a consistent pattern, such as team and severity, so routing rules stay readable. The check is that every receiver name is unique and each one points to the endpoint recorded in the previous steps.
Add a default receiver
Set a top-level route whose receiver catches any alert that no team route matches, so an unlabeled alert still reaches a person. Pick a channel that a named owner watches and document who receives that fallback. Without this route, unmatched alerts are silently dropped by Alertmanager. The check is a test alert with no team label that lands in the default channel rather than disappearing.
Validate the configuration with amtool
Run amtool check-config against the candidate alertmanager.yml on the same Alertmanager version that will run in production. Fix any reference errors, missing receivers or invalid field names it reports before going further. Run the same check in your deployment pipeline so a broken file cannot reach a host. The check is a successful validation output with no errors, and a route tree you have reviewed for the team and severity labels you expect.
Reload Alertmanager without a restart
Reload the running Alertmanager so it reads the validated file. Confirm that the reload endpoint is enabled in your configuration before relying on it, and check the Alertmanager status page to confirm the loaded configuration matches the file you validated. If the reload fails, the previous configuration stays in effect, so read the logs before retrying. The check is a status page showing the new receivers and no configuration load errors in the logs.
Send a test alert to each receiver
Send a synthetic alert with labels that match each team route, using amtool alert add or a test rule that you then remove. Confirm that the Slack message and the Teams card appear in the correct channels and that the content includes the alert name, severity and labels you expected. Then clear the alert and confirm that a resolved message arrives in each channel. The step closes when every receiver has shown both a firing and a resolved message, and the results are recorded for the change ticket.
Routing by team and severity so the right channel gets each alert
Routing decides which receiver gets each alert, so it is the part of the Slack and Teams setup that determines whether the right people see a problem. Alertmanager walks the route tree from the top, comparing each alert's labels against the matchers on every child route. The first child route whose matchers fit is used, so a route for team="payments", severity="critical" placed above a broader route for team="payments" wins for critical alerts. Your team labels and severity labels must be set consistently in alert rules, or matchers will silently miss them. Before rollout, agree on the label names, allowed values and which label is authoritative when an alert carries two conflicting values.
The group_by setting on each route controls which alerts share one notification. Grouping by alertname and team gives one Slack or Teams message per rule per team, which keeps a burst of related alerts readable. Grouping by a high-cardinality label such as instance produces many small messages, while an empty list collapses everything into one message that hides which service is affected. Confirm the grouping choice with the team that receives the messages, because it changes how a channel looks during an incident. The group_wait, group_interval and repeat_interval timings on the same route shape how often a channel is updated.
Add a catch-all default route at the root with a receiver that always exists, so an alert with a missing or misspelled team label still reaches a shared triage channel instead of being dropped. The continue setting lets an alert keep matching sibling routes after it fires one receiver, which is useful when a critical payments alert should go to both the payments channel and a platform channel. Use it deliberately, because every extra match is another notification to manage. Test the full tree with the routing test tooling described in the Alertmanager documentation at Alertmanager documentation before rollout, using sample label sets for each team and severity, and confirm that every sample reaches the receiver you expect.
Which alert labels and annotations feed channel and message fields
This table maps the Prometheus alert labels and annotations you define to the places they affect in Alertmanager routing and in Slack or Teams messages. Read each row as a decision point: the label decides where an alert goes, while the annotation decides what the person reading it sees. The main takeaway is that routing depends only on labels, so every field you want to route on must be a label that follows one agreed naming convention.
| Field | Where it is used | Effect on the notification | Convention to agree on |
|---|---|---|---|
| team label | Route matchers and receiver selection | Sends the alert to the receiver for the owning team, such as a team-specific Slack channel or Teams workflow | One fixed set of team values, lowercase, matching channel names |
| severity label | Route matchers, continue routes and repeat intervals | Decides whether an alert pages, posts to a channel or only creates a ticket, and how often it repeats | A short closed list such as critical, warning and info |
| service label | group_by and message templates | Groups related alerts into one message and shows the affected service in the title | Stable service names that match the catalog or CMDB entry |
| environment label | Route matchers and channel selection | Keeps production alerts out of development channels and lets test environments use separate receivers | Values such as prod, staging and dev, applied to every rule |
| summary annotation | Message title or headline field | Gives the first line the reader sees in Slack or Teams, so it must stand alone without the rule name | Short, written as what is wrong, with no template-only text |
| description annotation | Message body in the template | Adds the measured value and context, which templates can insert with the alert's own values | Include the current value and the threshold so readers do not open Prometheus first |
| runbook_url annotation | Button or link in the message | Points the on-call engineer to the next steps, and the link text can be set in the template | One runbook per alert, checked when rules change |
| Labels not in the rule | Not readable by the template as annotations | Labels set in Alertmanager configuration, such as the receiver name, are available only where Alertmanager adds them | Confirm which fields your template version exposes before relying on them |
Slack and Teams message templates compared
Slack receivers in Alertmanager send either a plain text field or a blocks array, and the choice decides how much structure a responder sees before opening the alert. The first line should answer three questions without a click: what is firing, how severe it is, and which service or team owns it. A common pattern places the alert name, the severity label and the owning team label in the header, with the summary annotation directly beneath. Responders in a busy channel often read the first line on a phone, so the header deserves the most design effort.
- Header fields: Put
alertname,severityand the owning team in the title, since these drive triage. - Summary before description: Show the
summaryannotation first and keep the longerdescriptionfor the body. - Firing and resolved wording: Use a status word in the title so a channel scan separates firing from resolved messages.
- Links: Include a
runbook_urlannotation and a link back to the Prometheus or Alertmanager view. - Plain text fallback: Keep a
textvalue alongsideblocksso the notification still displays where blocks are not rendered.
Confirm the exact Slack receiver keys, including how send_resolved and block templating are set, in the Alertmanager documentation, then test the layout in a non-production channel before routing goes live.
Teams receives Alertmanager notifications through the msteamsv2 receiver, which targets the card format that Teams workflows and connectors expect. Teams cards have their own layout and field rules, so a template written for Slack usually needs a separate version for Teams. Plan the card so the title carries severity and alert name, and the first text block states the affected service and the owning team. Confirm which webhook type your tenant uses and what card schema it accepts before writing the template.
- Title line: Put severity and alert name in the card title so the channel list shows them at a glance.
- Owner and service: Add the team and service labels as fact rows near the top of the card.
- Actions: Add a runbook or dashboard link as an action element if your receiver version supports it.
- Grouped alerts: Grouped alerts arrive as one message, so show the count and the top few alerts in the body.
- Endpoint and authentication: Agree the webhook URL type and its access controls with your Teams administrator, since they determine what the receiver can post.
Check the field names and card schema against the msteamsv2 section of the Alertmanager receiver reference, and render a test card in the target channel before any on-call route depends on it.
Resolved notifications tell the team that a condition has cleared, but they help only when the receiver sends them and the message makes the state obvious. Alertmanager sends resolved notifications for a receiver when that receiver's send_resolved setting is enabled, so check the setting on every receiver rather than assuming it is on. A resolved message should repeat the alert name and the team and service labels from the firing message so responders can pair the two in the channel. Include the time the alert resolved, and show how long it was active if the receiver exposes that value.
- Matching labels: Repeat
alertname, team and service so the firing and resolved messages can be paired. - Clear status word: Use a RESOLVED label in the title that is visually distinct from FIRING.
- Start time: Carry the firing start time into the resolved message if your template can reference it.
- Silenced and inhibited alerts: Decide whether resolved notices should post for alerts that were silenced or inhibited, since those alerts may never have notified anyone.
- Separate channels: Some teams send resolved messages to a quieter channel so the paging channel stays focused on active problems.
Test a full firing and resolved cycle with a controlled test alert in each destination, and confirm the receiver's default for resolved notifications in its documentation.
Long messages are hard to read in both products, and Alertmanager grouping can produce large payloads when many alerts share a group. Slack and Teams each enforce their own size and field limits, and a message that exceeds them can be truncated or rejected. Check the current limits in Slack's and Microsoft's developer documentation and in the Alertmanager receiver reference before writing templates, because limits can change between releases. Design the template for the largest group your routing can produce, not only the typical one.
- Cap the alert list: Show the first few alerts in a group, plus a count of the rest.
- Short descriptions: Move detailed diagnostic output to the runbook or dashboard link.
- Selected labels only: Print only the labels responders use for triage, and leave out the rest of the series labels.
- Large-group test: Fire a batch of test alerts into one group to see how the template renders at volume.
- Truncation behavior: Confirm what the receiver does when a limit is reached, and whether a truncated message still shows the severity and owner.
Ask your platform or vendor contact for the limits that apply to your Slack workspace and Teams tenant, and record them next to the template so future changes are checked against them.
Securing webhook URLs and alert content in chat
A Slack or Teams webhook URL is effectively a credential: anyone holding it can post into the channel. The cards below cover where that URL lives, who can read it, what alert content reaches chat, and how to rotate it when people change roles. Each check applies to the Alertmanager host and its configuration files.
Keep webhook URLs out of version control
Put each Slack or Teams webhook URL in a secret file or a secrets manager and reference it from the receiver, rather than writing the literal URL into alertmanager.yml in a Git repository. Alertmanager can read credentials from files for several receiver settings, so confirm the exact key for each receiver type in the version you run. Scan commit history as well as the current tree, since a URL removed in a later commit still exists in history and should be treated as exposed and rotated.
Restrict who can read the configuration
The Alertmanager configuration file and the secret files it references should be readable only by the service account that runs Alertmanager and by the small group that maintains it. Check file ownership and mode on the host, the container volume mounts, and any ConfigMap or Secret objects in Kubernetes. Remember that anyone with access to the Alertmanager status page or configuration API may be able to see receiver details, so review which network segments can reach it.
Limit labels and annotations sent to chat
Chat receivers render whatever labels and annotations the template includes, so a template that prints every label can leak internal detail. Build the Slack or Teams message from a short allow list such as alert name, severity, service and a runbook link. Treat the instance and free-text annotation fields as the most likely places for sensitive content, and review them in a test alert before enabling the receiver for a wider audience.
Treat alert text as sensitive data
An alert that names an internal hostname, a database cluster, or a customer account is operational data, and it persists in chat history, search indexes and exports. Decide with the security and data owners which identifiers may appear in a shared channel, and move detail that is only needed by responders into the linked dashboard or runbook behind authentication. Confirm the retention and export settings of the chat workspace before deciding what it may hold.
Rotate webhooks when people leave
A webhook created by a person in Slack or Teams may stay valid after that person leaves the organization. Record which account created each incoming webhook or Workflows connection, and rotate the URL when the owner changes role or leaves, updating the secret file and reloading Alertmanager. Ask the chat administrator whether webhooks can be revoked centrally and whether connections are tied to a service identity rather than an individual.
Check TLS and access settings
The Prometheus security model describes TLS with a minimum of TLS 1.2, client certificate authentication, and HTTP basic authentication with bcrypt-hashed passwords, and warns that basic authentication without TLS exposes credentials in cleartext. Apply these settings to the Alertmanager web endpoint, and confirm that reload and admin endpoints are not exposed unless needed. Because Alertmanager has no built-in single sign-on, plan an authenticating reverse proxy in front of its UI and API if operators need a web console.
Prometheus security modelWhy Slack or Teams messages fail to arrive
This table lists the failures that most often stop Alertmanager notifications from reaching Slack or Microsoft Teams, with the likely cause and the first check for each. Work down the rows in order, since the configuration checks come before the network and delivery checks. Most silent failures trace back to a bad webhook, a route that never matches, or a delivery path that was never tested end to end.
| Failure | Likely cause | First check |
|---|---|---|
| Nothing arrives at all | Webhook URL is invalid, revoked, or was rotated in Slack or Teams | Send a test POST to the webhook URL from the Alertmanager host and read the HTTP status returned |
| Nothing arrives and errors appear in logs | Proxy or firewall blocks outbound HTTPS from the Alertmanager host | Check whether the host can reach the webhook endpoint directly, and whether http_config proxy settings are present |
| Some alerts never reach the channel | Route matcher uses label names or values that differ from what Prometheus actually sends | Open the Alertmanager status or alerts view and compare the exact label set of a firing alert with the matchers |
| Config changes stop all notifications | Configuration fails validation after a reload, so the running config may not match the file on disk | Run amtool check-config on the file and confirm the reload succeeded in the Alertmanager logs |
| Same message arrives several times | More than one Alertmanager replica sends the notification without clustering or deduplication | Confirm each Prometheus instance lists every Alertmanager, and check whether the replicas run in cluster mode |
| Firing messages arrive but resolved messages do not | send_resolved is off or unset on the receiver | Open the receiver configuration and confirm send_resolved is set to true for the Slack or Teams receiver |
| Messages arrive with empty or broken text | Template references a field that does not exist for that receiver or alert | Render the template against a sample alert payload and check the receiver logs for template errors |
What do Slack and Teams alert routing projects involve?
What drives the effort of an Alertmanager Slack or Teams routing project?
The effort follows the number of teams, severity levels, message templates, and how many environments run Alertmanager. Each team needs its own route, receiver and channel, and each severity level usually changes routing, grouping or message layout. Templates add work in proportion to how many alert types need readable messages. Webhook creation is also a driver: your identity and approval rules decide who can create an incoming webhook or Workflow in Slack or Teams, and that can add review steps before any route goes live. Running the same design across development, staging and production multiplies the testing, not the design work.
How long does a first working alert route take to confirm?
No duration is given here. The time to a first confirmed route depends on how quickly your channel owners and webhook owners approve the destinations, how many test windows you can use, and whether the first route covers one team or several. A useful first milestone is one test alert that fires from a real Prometheus rule, reaches the intended channel with the expected labels, and sends a resolved message when it clears. Ask any provider to state the milestones and the confirmation method in the written scope before work starts.
What must our team provide before a routing project starts?
Plan to supply four things. First, named channel owners who decide which Slack channel or Teams channel receives each team's alerts. Second, named webhook owners who can create and rotate incoming webhooks or Workflows in your tenants. Third, label conventions, such as a team label and a severity label on every alert, because routing matches on those labels. Fourth, test windows when Alertmanager can send real notifications without paging anyone during business activity. Without these, the first route usually stalls at approval or at labeling, not at configuration.
Can our own team set up Slack and Teams alert routing without a partner?
Yes, a team with Prometheus and Alertmanager experience can do this alone. The Alertmanager documentation covers receiver configuration and routing, and the work is mostly configuration, templating and testing. What a team needs is a written test plan: a list of routes to verify, a set of synthetic alerts with known labels, and a check for each expected channel message, including resolved notifications. Teams that already run promtool tests in CI can extend that practice to routing. A partner adds value when the approval process, the number of teams or the number of environments is large enough that coordinating owners becomes the main task.
What keeps needing attention after the Slack and Teams routes go live?
Several items recur. Webhook URLs or Workflow endpoints need rotation when someone leaves, when a secret may have leaked, or when your tenant policy changes, and each Alertmanager configuration that uses them must be updated. Message templates need changes when alert labels or annotations change. Route updates follow team reorganizations, new services and new severity rules. Each Alertmanager version change should be checked against the receiver settings you use, since release notes can change defaults. Plan an owner for each of these items so the routing does not drift quietly after the first successful test.
What risks should a security team check in a Slack or Teams alert integration?
Treat the webhook URL as a credential. Anyone who holds it can post into the channel, so store it in a secrets mechanism, restrict who can read the Alertmanager configuration, and rotate it on a schedule your policy sets. Check who can see alert payloads, since alert annotations can include hostnames, internal paths or customer identifiers that a broad channel audience should not read. Confirm that Alertmanager's own web and API access is protected, because silences and configuration views can be changed through it. Finally, check which Slack or Teams apps and workflows are approved in your tenant before creating new webhooks.
Does a routing project cover the Prometheus alert rules themselves?
Usually not in full. A Slack and Teams routing project covers Alertmanager receivers, routes, grouping, message templates and the test plan that proves each route works. Writing or tuning the alert rules that decide what fires is a separate piece of work, as is unit testing those rules. If your alerts are noisy or cause-based, routing will simply deliver the noise to more places. Ask the provider to state in the written scope whether rule design and rule testing are included, and which label conventions the routing depends on.
How DeployOpen works on this
DeployOpen plans and builds Alertmanager notifications to Slack and Microsoft Teams inside your own infrastructure, starting from the routing and ownership rules your teams already use. The work is scoped in writing before it starts, built against your existing Prometheus setup, and handed over with documentation your operators can maintain.
How we scope
- We inventory your Prometheus and Alertmanager setup, receivers, and current paging or chat channels before agreeing scope.
- We agree in writing which Slack channels, Teams workflows, and team and severity routes are covered.
- Engagements are fixed-scope, with deliverables and timelines agreed before work begins; ongoing support is available as a retainer.
How we build
- We configure Slack and Teams receivers, webhook credentials, and message templates in your Alertmanager configuration.
- We build routing by team and severity and check each route with test alerts before it reaches production channels.
- We store webhook URLs as protected secrets and review who can read or change the Alertmanager configuration.
How we hand over
- We document receiver settings, routing labels, template variables, and the steps to rotate a Slack or Teams webhook.
- We walk your operators through how to send a test notification, read a routing decision, and add a new team route.
- We provide the configuration as files your team can keep under version control, with the handover agreed in the written scope.
How we support
- Retainers cover configuration changes, Alertmanager and Prometheus version upgrades, and retesting after changes to channels or teams.
- We can retest notification paths after Slack or Microsoft Teams changes their webhook or workflow behavior.
- Support scope, response expectations, and included upgrades are confirmed in the retainer agreement before it starts.

