Mattermost performance alerting in Grafana: what it does and when you need it
If your self-hosted Mattermost already sends metrics to Grafana dashboards but nobody is notified when latency or error rates climb, those dashboards only help people who happen to open them. Grafana alert rules evaluated against the dashboard queries, routed through contact points, close that gap. This topic covers two contact point types: a Mattermost alerts channel, where Grafana posts notifications back into Mattermost, and email, which reaches people outside the channel and gives you a record that does not depend on chat. The metrics themselves are collected and displayed through the separate Prometheus and Grafana monitoring topic, so this page assumes that pipeline already works and that the dashboards show the Mattermost metrics you care about.
Mattermost's documentation describes alerting as essential once a deployment reaches a certain size. Confirm the size at which Mattermost draws that line and ask which thresholds it has in mind, because the answer shapes how much alerting effort is justified for your team. A practical test is to ask who would learn about a latency spike today and how long that would take. If the answer depends on someone opening a dashboard, you already have the gap alerting fills. If you run several Grafana servers, check the Grafana high availability documentation first, since alerting needs extra configuration there to avoid duplicate notifications.
Before you build any rule, decide who owns each alert, which contact point receives it, and what happens when the monitored server itself fails. A Mattermost alerts channel hosted on the server being watched cannot tell you that the server is down, so pair it with an email contact point that reaches people through a route outside Mattermost. Grafana provisioning can define alerting resources as YAML or JSON files loaded at startup, which lets you review contact points and rules in version control before they change. Plan how credentials for the Mattermost posting endpoint will be stored and rotated, and confirm the exact setup steps for your Grafana version before you rely on them in an incident.
Which contact point fits which team
This table compares a Mattermost incoming webhook contact point, an email contact point and both used together, along with the notification policy and silence settings that sit on top of them. Read each row against the team that will act on the alert, since the right choice depends on who must respond and how quickly. The main takeaway is that a webhook reaches responders in the channel where work happens, while email gives a durable record and a path that does not depend on Mattermost being up.
| Option | What it posts | Who it reaches | Main trade-off |
|---|---|---|---|
| Mattermost incoming webhook | Alert title, labels and status into a chosen alerts channel | Members of the alerts channel, usually platform and on-call staff | Channel noise if grouping is loose, and no alert arrives if the Mattermost server is down |
| Email contact point | Alert summary and details sent to one or more mailboxes or distribution lists | Named recipients, including managers and teams outside Mattermost | Mailbox delays and filtering, and mail routing depends on your SMTP setup |
| Both contact points together | The same alert in a channel and in an inbox | Responders in chat and owners who track alerts by email | Duplicate traffic to manage, so confirm which route is the primary record |
| Notification policy grouping | Groups related alerts into one notification by labels such as cluster or node | Whoever receives the routed notification | Grouping too broadly can hide a second failure, so confirm label choices with your team |
| Silences and mute timings | Suppresses notifications during planned maintenance or known windows | Nobody while the silence is active | Forgotten silences can hide real faults, so confirm an expiry and an owner for each |
| Mattermost server health | Depends on the alerts channel receiving posts from the Grafana integration | Only users in the alerts channel | Confirm whether an email route should exist as a backup for outages that affect Mattermost itself |
Setting up Mattermost alerts in Grafana step by step
This sequence takes a running Mattermost metrics stack to a tested alert path, so that a Mattermost health problem reaches a named channel and an on-call inbox. Each step ends with a check that shows the previous step worked before the next one starts.
Confirm Mattermost metrics and dashboards work first
Before any alert is written, confirm that Prometheus is scraping the Mattermost metrics endpoint from every cluster node and that the Mattermost dashboards in Grafana show live data for each node. Check the query results per node, not only the aggregate, because a single silent node can hide a fault. Alerts built on an empty or partial data source will never fire, so this check is the foundation for everything that follows. Done means every node appears as a series on the dashboards and the values change over time.
Create an alerts channel and integration credential
Create a dedicated alerts channel in Mattermost, separate from working conversations, and restrict who can post to it. Create the integration credential that Grafana will use, such as an incoming webhook or a bot account, and assign a named owner who is responsible for rotating it and for changes to its permissions. Store the credential in your secrets manager rather than in dashboard notes. Done means the owner is recorded, the channel exists, and a test message posted with the credential appears in the channel.
Add the Mattermost contact point in Grafana
In Grafana, create a contact point that targets the Mattermost webhook or bot credential and points at the alerts channel. Keep the credential in Grafana's secure settings where your deployment supports it, and confirm the exact integration type and fields against the Grafana and Mattermost documentation for your versions. Add an email contact point at the same time if your on-call process needs one. Done means the contact point saves without error and the Grafana test send reaches the channel.
Attach the contact point to a notification policy
Create or edit a notification policy so that alerts carrying the Mattermost performance labels route to the new contact point. Set grouping so that related alerts from the same Mattermost cluster arrive as one message rather than a flood. Make sure a default route exists so no alert is dropped if labels are missing. Done means a policy matcher selects the test alert and the routing preview shows it going to the Mattermost contact point.
Write one alert rule for a Mattermost health signal
Write a single alert rule for one clear health signal from the Mattermost metrics, such as a node that stops reporting or a response-time signal that breaches a threshold you have agreed with the platform owner. Set the evaluation interval, pending period and no-data behavior deliberately, and label the rule so the policy from the previous step matches it. Choose the threshold from observed baseline data on your own nodes, not from a generic value. Done means the rule evaluates on schedule and shows a normal state in the rule view.
Send a test notification and confirm delivery
Trigger the alert deliberately, for example by temporarily lowering the threshold on a non-production instance or by stopping the metrics endpoint in a controlled window. Confirm the message appears in the alerts channel with the rule name, labels and a link back to the dashboard. Confirm any email contact point also delivers. Record the time between the condition and the message, and check that it is acceptable for your on-call process. Done means the firing message is in the channel and the recipient list is confirmed.
Verify the alert resolves and document the setup
Remove the test condition and confirm that Grafana sends a resolved message to the same channel and that the alert state returns to normal. Check that the resolved message is not swallowed by grouping. Then document the contact point, policy, rule, owner and credential rotation process. Before go-live, confirm the high availability setting: where Grafana runs more than one active server, the alerting configuration needs additional steps to avoid duplicate notifications, so verify that only one instance sends each message. Done means a resolved message arrives and a single firing notification was observed.
How a Mattermost metric becomes an alert notification
The path starts at the Mattermost metrics endpoint on each server, which Prometheus scrapes across the trust boundary between the Mattermost network and the monitoring network. Grafana alert rules evaluate the stored series, and when a rule fires, the notification policy routes the alert to contact points. One contact point posts into a Mattermost alerts channel and another sends email. Check the scrape target first, because a failed scrape can leave alert rules silent without an obvious error.
Alert path from Mattermost metrics to the alerts channel and email.
Security and operational risks in alert routing
Alert routing sends operational data from Grafana into a Mattermost channel and, if you add one, a second route outside Mattermost. Each path creates its own credential, audience, and failure mode, so the risks below should be decided before the first alert rule goes live.
Protect and rotate the webhook credential
A Grafana contact point that posts into Mattermost holds an incoming webhook URL, and anyone who has that URL can post into the channel as the integration. Store the URL in Grafana's secure settings or a secrets manager rather than in dashboard JSON or a shared runbook. Set a rotation schedule and a rotation procedure that updates Grafana and the Mattermost integration in the same change window, and confirm that removing an old webhook actually stops it from accepting posts.
Grafana provisioning docsRestrict who reads the alerts channel
Alert messages often name internal hostnames, cluster nodes, database endpoints, and dashboard links. Anyone who can read the channel can learn that topology, so the channel should be private and limited to the people who respond to these alerts. Review channel membership on the same schedule as your other access reviews, and confirm whether guest accounts or external members can see the channel before you route production alerts to it.
Require authentication on the metrics endpoint
The Mattermost metrics endpoint feeds the data behind these dashboards and alerts, so it should not be open to anonymous callers on the network. Grafana's security hardening guidance recommends requiring authentication for its own metrics endpoint, which is a separate control from the Mattermost endpoint. Confirm which scrape paths reach each endpoint, restrict them at the proxy or network layer, and test that an unauthenticated request is refused.
Grafana security hardeningAvoid alert storms
Rules that fire on every brief spike or that repeat for every affected node will flood the channel. Once people start muting it, real incidents get missed. Group related alerts into a single notification, set evaluation windows long enough to ignore short bursts, and set repeat intervals so a still-firing alert does not post every few minutes. Review the alert volume after the first two weeks and retire rules nobody acts on.
Keep a route that works when Mattermost is down
An alert that is delivered through Mattermost cannot tell you that Mattermost itself has failed. Add a second contact point that does not depend on Mattermost, such as email through your SMTP service or a paging tool your on-call team already uses, and send at least the availability and database-connectivity alerts there. Test the fallback by taking a non-production Mattermost offline and confirming the notification arrives.
Record alert rule changes as code
Alert rules, contact points, and notification policies change over time, and an undocumented edit can silence the rule that would have caught the next outage. Define these resources in provisioning files or another as-code workflow and keep them in version control with reviewed changes. Grafana documents provisioning and other as-code options, so confirm which of them your Grafana edition and deployment method support before you choose one.
Questions teams ask before setting up Mattermost alerting
What does Mattermost alerting cost and what drives the effort?
The cost is mostly the labor to define alert rules, build contact points, test them and hand them over, so the main drivers are the number of alert rules, the number of Mattermost nodes that must be covered, and how much of the Grafana setup is already done. Quoted work is usually split into one-time build and test effort and any recurring review. Ask the quote to list the alert rules by name, the nodes and dashboards in scope, the Grafana edition, and whether SSO or team sync must be configured. Grafana's own pricing page lists no fixed cost for self-hosted editions, and Grafana Cloud pricing differs, so confirm which deployment the quote assumes. DeployOpen does not publish a price list, and a quote follows from the written scope.
Does the number of Mattermost nodes change the alerting work?
Yes. Mattermost high availability runs redundant application servers, so an alert set that only watches one node can miss a failed peer. The alerting design needs to cover every node the cluster runs, and the Mattermost high availability documentation is the reference for the cluster layout. Mattermost high availability is available only on the Enterprise and Enterprise Advanced plans, so confirm the plan before designing node-level alerts. Ask the quote to state how many nodes, load balancers and database replicas will be monitored and how each one is labeled in the metrics.
Can a team set up Mattermost alerting without outside help?
A team with working Grafana and Mattermost administration skills can do the work alone, and many do. The skills that matter are writing Grafana alert rules, configuring contact points, handling Mattermost webhook or bot credentials, and testing alerts that fire on real failures. Outside help is most useful when the team has no one who owns both the monitoring stack and the Mattermost server, or when alerts must be provisioned as code and reviewed. Ask any partner to show which parts they will hand over and which the team must keep running, so the team can judge its own capacity honestly.
How long does Mattermost alerting take to set up?
The duration depends mainly on what already exists. A team with a running Prometheus and Grafana stack, scraped Mattermost metrics and a Mattermost alerts channel needs far less time than a team starting from zero, and the work involves Grafana, Mattermost and the mail system. Ask for a timeline that separates the metrics and dashboard checks, the contact point build, the email path, the test window and the handover. DeployOpen agrees timelines in writing before work starts, so a dated plan should appear in the scope.
What does the client need to provide for alerting work?
The client needs named owners, a test window and access to the systems involved. Named owners should cover the Mattermost administration, the Grafana administration, and the on-call response for each alert channel, because an alert that nobody answers adds no value. The test window is needed to trigger test alerts without paging people during a live incident. Access includes Grafana with rights to create alert rules and contact points, and the Mattermost admin console with rights to create the alerts channel and a bot or webhook credential. Ask the quote to list each access grant and who approves it.
How do Grafana Enterprise SAML and team sync change who can edit alerts?
SAML, team sync, active sync and SCIM provisioning are available only in Grafana Enterprise and Grafana Cloud, according to the Grafana authentication documentation. On other editions, alert editing rights are managed through local accounts or the supported OAuth, LDAP and proxy methods. With team sync, Grafana can map identity provider groups to Grafana teams, so only the right people can edit alert rules and contact points. Without it, rights are managed by hand and drift over time. Confirm the Grafana edition before planning who edits alerts, and ask the quote to state how alert edit rights are granted and removed.
Should alert rules be defined as code or set up in the Grafana interface?
Defining alerts as code is better for review and repeatable rebuilds, while the Grafana interface is faster for a one-off setup. Grafana provisioning loads data sources, dashboards, plugins and alerting resources from YAML or JSON files at startup, and Grafana documents further options including Terraform and Git Sync. Provisioned alerts are stored in files, so changes go through the same review as other infrastructure changes. The cost of provisioning is the upfront effort to write and test the files, and the benefit appears when the stack is rebuilt or upgraded. Ask the quote whether alerts will be provisioned, which format is used, and where the files are stored.
The deployment size where Mattermost says alerting becomes essential
The deployment size at which Mattermost says alerting becomes essential is not stated in the material this section is built on, so do not write a specific node count, user count or threshold into your runbook from memory. Confirm the exact wording and any figure in the Mattermost monitoring documentation for the server version you run, because the guidance can change between releases. What the Mattermost high availability documentation does make clear is where scale starts to change the monitoring problem. A high availability cluster consists of redundant application servers, redundant database servers and redundant load balancers, and it is available only on the Enterprise and Enterprise Advanced plans. Once several application nodes sit behind one load balancer, a failing node can be partly hidden from users, so a single healthy-looking front door no longer tells you much.
Read replicas and search replicas add more places where things can go wrong. The HA documentation describes reads distributed across replicas while writes go to the primary database, so an overloaded primary, a lagging replica or a slow search node can each degrade the experience while the others look fine. Each of these components needs its own signal. The same applies to metrics: the Prometheus target list must include every cluster node, not only the node your team set up first, or the Grafana dashboards will show a partial picture. Before you configure any alert, list every application node, replica and load balancer, and confirm that each one exposes metrics that your scrape configuration reaches.
Treat the move to a cluster as the trigger to design alerts, not as a number to wait for. If you run more than one Mattermost application node, plan alert coverage for the load balancer, each node, the primary database and each replica before go-live. If Grafana itself runs in high availability, note that the Grafana documentation says alerting needs additional configuration to avoid duplicate notifications, so test that a single failure produces one message in your alerts channel. Document who owns each alert and where the Mattermost monitoring documentation for your release says the metrics come from.
How DeployOpen scopes and delivers Mattermost alerting
DeployOpen plans, builds and hands over Mattermost performance alerting in Grafana inside your own infrastructure. We start from a written scope that names the dashboards, contact points and alert routes your operators need, then build and test them against your deployment.
How we scope
- Review your Mattermost deployment shape, including whether you run a single server or a cluster behind a load balancer.
- Agree in writing which dashboards, alert rules, contact points and notification routes are in scope.
- Confirm the Grafana version, hosting model and plan level for Mattermost before any build work starts.
How we build
- Configure a contact point that posts alerts back into a dedicated Mattermost alerts channel.
- Set up email contact points and notification policies, and test each route with sample alerts.
- Define alert rules as provisioned files so changes are reviewed and repeatable across environments.
How we hand over
- Deliver the alert rules, contact point settings and provisioning files in a documented, version-controlled form.
- Provide a runbook describing each alert, its threshold, its owner and the first steps on receipt.
- Walk your operations team through testing, silencing and changing alerts before the engagement closes.
How we support
- Offer ongoing support, upgrades and continuous testing for alerting as a retainer after handover.
- Review alert noise and threshold changes with your team as Mattermost and Grafana versions move forward.
- Retest alert routes after platform upgrades so notifications keep reaching the right channel.

