跳到主要内容

💬 Slack

Get monitoring alerts directly in your Slack channels with rich formatting and color-coded severity badges.


🔧 设置​

Step 1: Create a Slack Webhook​

  1. Go to api.slack.com/apps → Create New App → From scratch
  2. Name it Monitron and select your workspace
  3. Go to Incoming Webhooks → Turn it On
  4. Click Add New Webhook to Workspace
  5. Select the channel (e.g., #monitoring-alerts)
  6. Copy the Webhook URL

It looks like: https://hooks.slack.com/services/T00/B00/xxxxx

Step 2: Add to Contact​

When editing a contact, add the Slack channel:

设置值
ChannelSlack
Webhook URLhttps://hooks.slack.com/services/T00/B00/xxxxx

📨 消息格式​

Monitron sends rich Slack attachments with:

  • 🔴 Red for Down alerts
  • 🟢 Green for Recovery alerts
  • Monitor name, status, and response time
  • Timestamp of the event

💡 技巧​

  • Create a dedicated #monitoring channel
  • Use different webhook URLs for different severity levels (e.g., #alerts-critical for critical, #alerts-info for others)