Setting Up Slack Integration
Integrating Server Scout with Slack ensures your team receives immediate notifications about server issues directly in your preferred Slack channels. This guide walks you through the complete setup process, from creating webhooks to troubleshooting common issues.
Creating a Slack Incoming Webhook
Method 1: Slack App (Recommended)
- Visit api.slack.com/apps and click "Create New App"
- Choose "From scratch" and provide an app name (e.g., "Server Scout")
- Select your workspace and click "Create App"
- In the app settings, navigate to "Incoming Webhooks" in the sidebar
- Toggle "Activate Incoming Webhooks" to "On"
- Click "Add New Webhook to Workspace"
- Select the channel where you want Server Scout alerts to appear
- Copy the generated webhook URL (it starts with
https://hooks.slack.com/services/)
Method 2: Legacy Webhook
- Go to your Slack workspace's App Directory
- Search for "Incoming WebHooks" and add the integration
- Choose a channel and click "Add Incoming WebHooks Integration"
- Copy the webhook URL provided
Note: Legacy webhooks are being phased out by Slack. We recommend using the Slack App method for better long-term reliability.
Configuring Server Scout
- Log into your Server Scout dashboard
- Navigate to Settings > Notification Channels
- Click "Add New Channel" and select "Slack"
- Enter a descriptive name for the channel (e.g., "Infrastructure Alerts")
- Paste your webhook URL into the "Webhook URL" field
- Optionally customise the channel name and username that will appear in Slack
- Click "Save" to create the notification channel
You can now assign this Slack channel to any of your monitoring rules under the alert configuration section.
Understanding the Message Format
Server Scout sends rich, colour-coded messages to Slack using a structured JSON payload. The message format includes:
- Colour coding: Green for resolved alerts, yellow for warnings, red for critical issues
- Server information: Hostname and affected service
- Alert details: Metric values, thresholds, and timestamps
- Quick actions: Links back to your Server Scout dashboard
Here's an example of what the JSON payload looks like:
{
"attachments": [
{
"color": "danger",
"title": "CPU Usage Alert",
"text": "server01.example.com - CPU usage is 95% (threshold: 80%)",
"fields": [
{
"title": "Server",
"value": "server01.example.com",
"short": true
},
{
"title": "Metric",
"value": "CPU Usage: 95%",
"short": true
}
],
"timestamp": 1634567890
}
]
}
Testing Your Integration
Before relying on your Slack integration, it's essential to test it properly:
- In Server Scout, go to your notification channel settings
- Click the "Test" button next to your Slack configuration
- Check your designated Slack channel for a test message
- Verify that the message appears correctly with proper formatting
You can also temporarily lower alert thresholds on a test server to trigger genuine alerts and confirm the integration works end-to-end.
Customising Slack Appearance
To make your alerts more recognisable:
- Channel Override: Specify a different channel in Server Scout to override the webhook's default
- Username: Set a custom username like "Server Scout Bot" for easy identification
- Icon: Configure an emoji or custom icon in your Slack app settings
Troubleshooting Common Issues
Webhook Not Working: Check if your webhook URL is correct and hasn't expired. Slack apps created through the modern method are more reliable than legacy webhooks.
Messages Not Appearing: Verify that the Server Scout bot has permission to post in your chosen channel. Private channels may require explicit invitation of the webhook.
URL Validation Errors: If Server Scout is hosted on a private network, Slack's URL validation might block requests. Ensure your Server Scout instance can reach hooks.slack.com on port 443.
Formatting Issues: If messages appear as plain text, check that your webhook URL is correctly configured for incoming webhooks, not other Slack API endpoints.
By following this guide, you'll have robust Slack integration that keeps your team informed about server health in real-time, ensuring rapid response to any infrastructure issues.
Frequently Asked Questions
How do I set up Slack integration with ServerScout?
Why are my Slack webhook messages not appearing?
What information is included in ServerScout Slack alerts?
Should I use Slack app method or legacy webhooks?
How can I test my Slack integration before going live?
Can I customize how ServerScout alerts appear in Slack?
What does the ServerScout Slack webhook URL look like?
How do I fix URL validation errors with ServerScout Slack integration?
Was this article helpful?