Grafana alerts in Mattermost channels

Grafana alerts reach a Mattermost alerts channel through an incoming webhook and a Slack-type contact point. This page covers the documented setup, the checks that prove it works and the failure points teams hit.

On this page

How Grafana alerts reach a Mattermost channel

When Grafana fires an alert and the notification lands in a personal inbox or a channel nobody watches, the on-call team loses minutes it does not have. The supported method is a Mattermost incoming webhook in a dedicated Alerts channel, paired with a Grafana contact point of type Slack that points at that webhook, as Mattermost's performance alerting guide documents. Grafana already speaks the Slack webhook format, so no custom connector, plugin or bridge service is involved. Mattermost receives the payload on the webhook URL and posts it into the channel you chose when you created the webhook.

The integration moves notifications and nothing more. It does not acknowledge alerts, silence rules, escalate pages or change how Grafana evaluates alert rules, and Grafana remains the system that decides an alert is firing. Expect the message text to follow Grafana's Slack-style template rather than a Mattermost-native format, and confirm that the fields your responders need appear in it. Because the webhook is a bearer-style URL, anyone who holds it can post into that channel, so treat it as a credential: restrict who can manage the Alerts channel, store the URL in Grafana's secrets handling rather than in a shared document, and confirm with your Mattermost administrator how webhooks are enabled on your server.

Before relying on this path, run a test send from the Grafana contact point and confirm the message arrives in the Alerts channel with the expected mention. Then confirm which Grafana and Mattermost versions your environment runs, since both products release on their own schedules and the contact point settings can change between them. Decide now whether a mention notifies a single on-call group or the whole channel, because a broad mention during a noisy incident is a common source of alert fatigue.

What you need before you configure Grafana alerts in Mattermost

Three systems have to line up before any alert can arrive: a Mattermost server where you can create an incoming webhook and an Alerts channel, a Grafana instance with alerting enabled and a user allowed to add contact points, and a network path from Grafana to the Mattermost URL. The webhook URL links them, so treat it as a credential from the first step.

Mattermost server and admin access

You need a running self-hosted Mattermost server and an account that can enable incoming webhooks in the System Console and create or manage the Alerts channel. Confirm that the webhook feature is turned on for your server and that the people who will create webhooks have the right permissions. Check the exact server version against the current Mattermost release notes for your environment, because the webhook settings and the performance alerting guide can change between releases.

Performance alerting docs

Dedicated Alerts channel

Create a channel for alert traffic before you create the webhook, and decide who can read it. Alerts can include service names, hostnames and query details, so a public channel may expose more than the on-call team should see. Keep the channel's membership aligned with the people who will act on alerts, and decide whether a bot or service account should post into it.

Grafana instance with alerting enabled

Confirm that Grafana is running with unified alerting available and that the Grafana version you run matches the release you tested against. Grafana's supported minor releases have fixed support windows, so check the version in your environment against Grafana's upgrade guidance before you build the integration. Production deployments should use MySQL or PostgreSQL rather than the default SQLite.

Grafana upgrade guidance

Admin rights to add contact points

Adding a contact point and attaching it to a notification policy requires a Grafana role that can edit alerting resources. Confirm which users hold that role in your organization, and whether alerting resources are managed through the UI or provisioning files. If you provision contact points as code, the webhook URL must be supplied from a secret store instead of being written into the file.

Network path from Grafana to Mattermost

Grafana must be able to reach the Mattermost URL over HTTPS from the host or container that sends notifications. Check outbound rules, proxies, DNS resolution and TLS trust, especially when Grafana and Mattermost sit in different network zones or when Mattermost is in an air-gapped segment. Test reachability from the Grafana host before you rely on the test send, since a failed delivery can look like a configuration error.

Webhook URL handling

The incoming webhook URL lets anyone who holds it post into the channel, so store it as a secret. Keep it out of dashboards, shared runbooks, version control and screenshots, and plan how you will rotate it if it leaks or when someone with access leaves. Record which Grafana contact point uses which webhook so a rotation does not leave alerts silently failing.

Configuring the webhook, contact point and test send

This sequence connects a Mattermost Alerts channel to Grafana by creating an incoming webhook, pointing a Slack-type contact point at it, and confirming delivery with a test send. Each step ends with a check so you know the path works before any real alert depends on it.

  1. Create the dedicated Alerts channel

    A Mattermost system admin or a team admin creates a channel for Grafana notifications, such as an Alerts channel in the team that owns the monitored services. Keep it separate from general discussion so alert traffic stays visible and easy to filter. Choose who can read it, because alert messages can include metric names, host names and dashboard links. Done means the channel exists, is set to the intended privacy level, and its members include the people who will act on alerts.

  2. Enable incoming webhooks on the server

    Open the System Console and confirm that incoming webhooks are enabled for the server, since a webhook cannot be created while the setting is off. The setting is under the integrations section and may be restricted by your organization's policy, so ask the server administrator to confirm who can change it. Done means the System Console shows incoming webhooks as enabled and a user with the right permissions can open the integrations page without errors.

  3. Create the incoming webhook for the Alerts channel

    From the team's integrations page, add an incoming webhook, select the Alerts channel as its target, and give it a clear display name such as Grafana alerts. Mattermost generates a webhook URL that carries the secret for that channel. Copy it into your password manager or secret store rather than a shared document, and treat it as a credential. Done means the webhook appears in the list with the correct channel and the URL is stored where the Grafana administrator can retrieve it.

  4. Add a Slack contact point in Grafana

    In Grafana, open Alerting, go to Contact points, and create a new contact point with the integration type set to Slack. Paste the Mattermost webhook URL into the webhook field. Grafana uses the Slack integration type because Mattermost accepts the same incoming webhook format, as Mattermost's performance alerting guide documents. Done means the contact point saves without a validation error and appears in the contact point list.

  5. Set the optional mention

    If alerts should notify a specific person or group, add the mention text in the contact point's mention field, using the Mattermost syntax for a user or group such as an at-sign followed by a username. Keep mentions limited to on-call roles, because a mention in a busy channel can produce unwanted notifications. Confirm the name against the Mattermost user or group before saving. Done means the mention field holds the intended handle and the handle matches an account or group that can be notified in that channel.

  6. Send a test notification from the contact point

    Use the test option on the contact point to send a sample alert. Grafana posts through the webhook, so the message should arrive in the Alerts channel without a notification rule being triggered. Check that the sender name, message text and any mention appear as expected. If nothing arrives, check the webhook URL for copy errors, confirm the webhook still exists, and confirm the Grafana server can reach your Mattermost URL. Done means the test message is visible in the Alerts channel.

  7. Confirm success in the Grafana contact point

    Return to the Grafana contact point and confirm it reports a successful test send. A green result in Grafana and a visible message in Mattermost together show that the path works in both directions of configuration. Record the webhook owner, the channel name and the contact point name in your operations notes so future changes can be traced. Done means both systems confirm the test and the configuration is documented for the next person who maintains it.

How an alert travels from Grafana to a Mattermost channel

The path starts when a Grafana alert rule fires and the notification policy routes the alert to a contact point of type Slack. That contact point sends the request over HTTPS to the Mattermost incoming webhook URL, and Mattermost posts the message into the Alerts channel for its subscribed members. The trust boundary sits around the webhook URL, because anyone who holds it can post into the channel. Check the network path between Grafana and Mattermost, and confirm that the webhook URL is stored as a secret in Grafana.

Alert path from Grafana rule to subscribed Mattermost members, with the webhook trust boundary.

Which Grafana alert fields appear in Mattermost messages

This table maps the Grafana alert elements a team usually cares about to where they land in a Mattermost post when the contact point is a Slack type pointed at a Mattermost incoming webhook. Use it as a checklist for your own test sends, because the documented setup does not promise field-level fidelity for every element.

Grafana elementWhat to expect in MattermostWhat to verify in your environment
Alert state (firing or resolved)Expected to appear in the post text or attachment, so responders can tell a new alert from a recovery. Confirm the exact wording in a test send.Trigger a test firing and a resolution, then compare both posts side by side.
Rule nameExpected to be included in the post so the alert can be identified without opening Grafana.Confirm the rule name is visible and not truncated in the channel view.
LabelsLabel values may or may not render as separate fields. Treat their presence as unconfirmed until you see them in a post.Use a rule with two or three distinct labels and check each one in the rendered message.
Annotations (summary, description)Annotation text is the most likely content to carry into the message body, but long text or templates may be shortened or reformatted.Use a long annotation and a templated value, then check whether the full text arrives.
Dashboard and panel linksLinks may appear as clickable URLs in the post. Confirm that the link points to the correct dashboard and panel and that it opens for the recipient.Click each link from a test post as a user who has Grafana access.
Channel selectionThe channel is set by the incoming webhook created in Mattermost, not by the Grafana contact point. Choose the Alerts channel when you create the webhook.Send a test alert and confirm it lands in the intended channel only.
Mention settingsAn optional @ mention in the contact point adds a notification target. Choose a user, group or channel mention that the on-call team actually monitors.Test the mention with a non-owner account to confirm the right people are notified.

Securing the webhook URL and alert routing

The Alerts channel webhook is the only thing standing between a Grafana alert and anyone who finds the URL, so its handling matters as much as the alert rules themselves. The cards below cover where the URL lives, who can change where alerts go, who can read them, and what to do when the URL leaks. Work through them together before the first alert goes live.

Treat the webhook URL as a credential

An incoming webhook URL lets anyone who holds it post messages into the Alerts channel as the webhook's bot. Store it only in the Grafana contact point's secure fields, where Grafana keeps it encrypted rather than as plain text. Keep it out of dashboard JSON, shared runbooks, chat messages and provisioning files committed to Git. If you manage contact points as code, inject the value from your secrets manager at deploy time. Confirm in your Grafana version how secure fields behave in exports and provisioning before you rely on them.

Grafana provisioning docs

Restrict who can edit contact points

Anyone who can edit a contact point can redirect alerts to a channel they control or copy the webhook URL out of the configuration. Limit contact point editing to the small group that owns alerting, and give read-only roles to people who only need to view alert status. Review these role assignments whenever engineers change teams. Grafana's role model is the place to enforce this, so check the role assigned to each user and service account against the people who actually maintain alert routing.

Keep the Alerts channel membership small

Alert text often carries hostnames, service names, internal IP addresses and label values that describe production systems. Every member of the Alerts channel can read that text, and Mattermost retains it according to your retention settings. Keep membership to the on-call and operations group, and avoid adding broad team or company-wide membership. Ask the Mattermost administrator to confirm who can join, leave and see the channel, since those rules are set on the Mattermost side.

Scope the webhook to one channel

Create the incoming webhook for the Alerts channel only, and do not reuse a webhook built for another team or tool. A dedicated webhook means that if the URL is exposed, you know which channel it can post to and which alerts it carries. It also makes revocation contained, because removing this webhook does not interrupt other integrations. Name the webhook after its purpose so administrators can find and audit it quickly.

Rotate the webhook when exposed

Treat any copy of the URL outside the secure fields as an exposure, including a pasted log line, a screenshot or a former employee's notes. When that happens, disable or delete the incoming webhook in Mattermost, create a new one for the same channel, and update the Grafana contact point with the new URL. Then send a test notification to confirm delivery. Record the rotation date and who performed it, and check the Mattermost audit trail for unexpected posts from the old URL.

Review admin access in Grafana hardening

Alert routing depends on the Grafana administrator account, which can change contact points, data sources and users. Review the security hardening settings the Grafana docs describe, including secure and SameSite cookies, the Content Security Policy and authentication on the metrics endpoint. Confirm that the version is hidden from unauthenticated users and that domain verification is enabled. Also confirm that break-glass admin accounts have strong, separately stored credentials and are not used for routine work.

Security hardening docs

Why Grafana alerts do not appear in Mattermost

This table lists the failures that most often stop Grafana alerts from reaching a Mattermost alerts channel, with the likely cause and fix for each. Work down the rows in order, because the first two checks (webhook status and URL) account for most silent failures. Confirm the exact behavior and menu names in the Mattermost and Grafana versions you run.

SymptomLikely causeFix
No message after a test send from the contact pointThe incoming webhook was disabled, deleted or regenerated in MattermostCheck the webhook in the Alerts channel's integrations settings, then update the contact point with the current URL
Test send fails with an error about the URLThe webhook URL is wrong or was cut off when copied, often missing the end of the token pathCopy the full URL again from Mattermost and paste it into the Slack-type contact point without trailing spaces
Connection timeout or refused in Grafana logsMattermost is not reachable from the network where Grafana runs, for example behind a firewall, proxy or separate VPCTest connectivity from the Grafana host or container to the Mattermost hostname on the HTTPS port, then open the route or proxy rule
TLS or certificate verification errorMattermost uses a private or internal certificate authority that Grafana does not trustAdd the internal CA certificate to the trust store used by the Grafana process or container, then restart Grafana and repeat the test send
Alerts arrive in a different channel or not at allThe alert rule routes to a different contact point, or a notification policy sends the alert to another receiverReview the notification policy tree and confirm which contact point each rule matches, then send a test from the intended contact point
Same alert posted two or more timesGrafana runs in high availability with two or more active nodes and alerting is not configured to avoid duplicate notificationsApply the Grafana high availability alerting configuration from the Grafana docs, then confirm one notification per alert state change in a test window
Alert fires in Grafana but no @ mention appearsThe mention text does not match a Mattermost username or group, or the mention is set on a different contact pointUse the exact username or group name in the contact point's mention field and confirm the target account can be mentioned in that channel

Questions teams ask before connecting Grafana to Mattermost

What does it cost to connect Grafana alerts to Mattermost?

The cost is the labor to configure and test the connection, and it scales with how much you connect. DeployOpen does not publish a price list, and a quote follows from a written scope. The main drivers are the number of alert rules and contact points to route, the number of Mattermost channels, the number of environments such as development, staging and production, and whether alerts need an approval step before they reach the channel. A single channel with one contact point is a small job. Ask any provider for a quote that lists each channel, each contact point, each environment, the testing included and what is handed over. Both Mattermost and Grafana have their own license costs, which are separate from any services work. Mattermost plans are sold as annual subscriptions by seat count, and Grafana's pricing page lists a Pro tier and an Enterprise tier. Confirm your current licensing with each vendor before you budget.

How long does a Grafana to Mattermost alert connection take?

The timeline depends mostly on how quickly you get access to both systems and how many contact points you need to connect. Creating the Alerts channel and incoming webhook in Mattermost is a short task once an admin is available. Adding a Grafana contact point of type Slack that points at the webhook, setting the optional mention and running a test send are also short steps for one contact point. Delays usually come from waiting for admin accounts, approvals for the webhook URL, or agreeing which alerts belong in which channel. Ask for a timeline that separates access and approvals from configuration and testing, so you can see which part is waiting on your organization.

What access and ownership does the work need from our team?

You need admin access to both systems. In Mattermost, that means someone who can create a channel and an incoming webhook for it. In Grafana, that means someone who can create and edit contact points and notification policies. You also need a named owner for the Alerts channel. The owner decides who can post to it, which alerts belong there, who responds to them, and who approves changes to the webhook. Without a named owner, alerts tend to be ignored and webhook URLs get copied into places they should not be. Store the webhook URL in a secrets store your team controls, and record who holds it.

Can our own team set up Grafana alerts in Mattermost without a partner?

Yes, for a single channel with one contact point, your own team can follow Mattermost's documented performance alerting steps. The work is an incoming webhook, a Slack-type contact point in Grafana, an optional mention and a test send. A review is still worth having for production. Reviewers commonly check that the webhook URL is not exposed in dashboards or exported configuration, that test alerts do not page people, that notification policies do not send duplicate alerts, and that the channel has a named owner. If you run Grafana in high availability, the Grafana documentation notes that alerting needs additional configuration to avoid duplicate notifications, so confirm that setup before relying on it.

Does the Grafana to Mattermost setup work on air-gapped networks?

The mechanism itself is local. Grafana posts to a Mattermost webhook URL, so both systems need network paths to each other inside your environment. Mattermost documents an air-gapped deployment starting point, and that starting point is part of the Enterprise Advanced plan, according to Mattermost's pricing page. Confirm with Mattermost that your plan and deployment model cover an air-gapped network before you commit. For Grafana, confirm the packages and images you need are available in your mirror or registry. Also check that any test or update path does not depend on external services. Ask your provider to document which components pull from the internet during installation and which do not.

Should alerts be sent to a production Mattermost channel without review?

Treat production alerting as a change that needs review, not a quick setting. Before going live, confirm which alert rules route to which channel, and who is paged for each severity. Send test alerts to a non-production channel first, then run one controlled test send to the production channel. Check the Grafana contact point configuration for the webhook URL in plain text, and move it to a secrets mechanism your team controls. Also decide how alerts that resolve are handled, since they can create noise if not routed carefully. Document the configuration so it can be reviewed and rebuilt, and rerun the test after any change to Mattermost or Grafana upgrades.

Should Grafana be provisioned as code for alert routing?

Yes, if you manage more than a handful of contact points or run several environments. Grafana's provisioning lets alerting resources be defined in YAML or JSON files that load at startup, and Grafana documents further as-code options including Terraform and Git Sync. Provisioned files make changes reviewable and repeatable, and they make it easier to rebuild after a failure. Keep the webhook URL out of the files themselves and inject it from your secrets store. For a single channel, a manual setup is usually enough, but record the settings so they can be reproduced.

Which versions should we confirm before connecting Grafana and Mattermost?

Confirm the Grafana and Mattermost versions you run against the current release information before you configure anything, because the steps depend on the versions in use. Grafana publishes minor releases roughly every other month and patch releases at least monthly, according to its upgrade guidance, so plan a check each time you upgrade. Mattermost releases a new server version in binary form on the 16th of each month, and its Extended Support Releases carry a longer support window. Ask your provider which versions the configuration was tested on, and retest the webhook and a test send after any upgrade on either side.

How the alert channel stays useful after go-live

The alert channel stays useful only if someone owns it after go-live. Plan a recurring review of the Grafana alert rules that post into the Alerts channel, because a rule that fires on every routine spike trains people to mute the channel, and a muted channel misses the alert that matters. For each noisy rule, decide whether to tune its threshold, lengthen its evaluation window, route it to a different channel, or retire it. Keep the review tied to the contact points as well, since a contact point that still points at a retired webhook or a channel nobody watches will fail silently.

Treat the webhook URL as a credential. Mattermost creates it as an incoming webhook, and anyone who holds the URL can post into the channel. Record where the URL is stored in Grafana, who can edit contact points, and the procedure for rotating it: create a new incoming webhook, update the Grafana contact point, run a test send, then disable the old webhook. Grafana's security hardening guidance also applies to the Grafana side, so confirm that the instance settings and access controls you set during deployment are still in place after each change. Confirm the rotation steps against your own Mattermost and Grafana versions before you write them into a runbook.

Grafana upgrades run on their own timetable. Grafana's upgrade guidance describes major releases once a year, minor releases every other month, and patch releases at least monthly, with each minor release supported for 9 months and the last minor release of a major version for 15 months. Check your running version against those windows at a regular interval, and schedule patch upgrades promptly. Mattermost server upgrades are a separate track: Mattermost ships monthly server releases and Extended Support Releases on its own schedule. After every Mattermost change, send a test alert through the contact point, confirm the message renders and the mention reaches the right people, and repeat that check after each Grafana upgrade as well.

How DeployOpen works on this

DeployOpen plans and delivers Grafana alerts in Mattermost channels inside your own infrastructure, starting from the alert routing you need and the Mattermost and Grafana servers you already run. The work is fixed-scope, so the channels, contact points, mentions and test sends are agreed in writing before anything is configured.

How we scope

  • Inventory the Grafana instance, its version and its database, and the Mattermost server that will receive alerts
  • Agree which alert sources, Grafana folders and severities should reach the alerts channel and which should not
  • Define channel membership, the @ mention for each severity and who may create or rotate the incoming webhook
  • Put the agreed scope, deliverables and timeline in writing before work starts, with a quote following from that scope

How we build

  • Create the Alerts channel and incoming webhook in Mattermost following the documented performance alerting steps
  • Configure the Grafana contact point of type Slack with the webhook URL, mention settings and notification policy routing
  • Run test sends from Grafana and confirm delivery, formatting and mentions in the target channel before go-live
  • Store the webhook URL in your secrets tooling and keep the contact point definition in version-controlled provisioning files where your setup allows

How we hand over

  • Deliver a configuration record listing channels, webhook owners, contact points, routing rules and mention targets
  • Document the test send procedure and the steps to rotate the webhook URL without losing alert routing
  • Walk your operations team through how to confirm a failed delivery and where to look in Grafana and Mattermost logs
  • Confirm with your team which alert notifications must be retained, and how long, before handover is signed off

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for Grafana and Mattermost changes
  • Plan a re-test of alert delivery after each Grafana or Mattermost upgrade, since both release on their own schedules
  • Review routing changes as new alert rules and teams are added, so notifications stay focused on the channel's purpose

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.