# Mattermost

> Mattermost alert channels through an incoming webhook on your own server - which addresses are accepted and how names and mentions are handled.

A Mattermost channel posts alerts to a Mattermost channel through an incoming webhook.

1. In Mattermost, add an incoming webhook under **Integrations → Incoming Webhooks**, pick the channel and copy its URL. It looks like `https://chat.example.com/hooks/xxx`.
2. On the project's **Alerts** page, choose **Add channel** → **Mattermost** and paste the URL.
3. **Send test** to see a message arrive.

The URL is checked as for a [webhook](https://docs.monitorly.cloud/alerts/webhook.md): `https`, at most 2048 characters, without a user name, password or fragment, and not `localhost` or an internal address. The name is resolved and checked again on every delivery. The URL is stored encrypted; the dashboard and the API show only its origin afterwards.

## The message

The same text as on other channels, ending with an **Acknowledge** link on DOWN and escalation messages. Markdown in check names is escaped, and `@` mentions in names (`@channel`, `@all`, `@here`, `@name`) notify nobody.

## When Mattermost refuses

The channel is **Not delivering** at once when the webhook was deleted, incoming webhooks are turned off on the server (501), the server answers 401, 403, 404 or 410, or it redirects with anything but 307 or 308. Add the new webhook as a new channel. When the server answers 429, delivery waits as long as it asks.

Everything else (what is sent, retries, order) works as for the [other channels](https://docs.monitorly.cloud/alerts.md).
