Skip to main content

Analyze Alertmanager incidents and post diagnostic reports to Mattermost

Workflow preview

Analyze Alertmanager incidents and post diagnostic reports to Mattermost preview
Open on n8n.io

Overview

Overview

This workflow helps automatically analyze alerts occurring in the infrastructure and suggest solutions even before the on-duty engineer sees the alert.

How it work

  1. Workflow receives alert from Alertmanager via Webhook.
  2. The variables required for operation are set
  3. Preparing a prompt for the agent containing only the data necessary for analysis
  4. Optional step to deduplicating duplicate alerts
  5. Getting the trigger condition
  6. The agent performs diagnostics as described in the system prompt. During operation, it can access various systems via MCP to obtain additional information.
  7. Search for a message in a Slack channel corresponding to a processed alert
  8. Send report to Slack thread.

How to use

  1. Generate webhook credentials and use it in Alertmanager
  2. Add Alert fingerprint into Slack message template
  3. Set variables it SetVars node
  4. Add your own Rules and recomendations to system promt 5 Run mcp servers
  5. Choose Slack channel with alerts