What Are Webhooks?
Webhooks are HTTP callbacks that Server Scout sends to your specified URL when monitoring events occur. Think of them as real-time notifications that push alert data directly to your applications, chat platforms, or incident management systems. Unlike polling for updates, webhooks provide instant notifications the moment an issue is detected or resolved.
Webhooks are particularly useful for:
- Integrating with custom dashboards or applications
- Triggering automated incident response workflows
- Sending notifications to team communication platforms
- Creating tickets in helpdesk systems automatically
Setting Up Webhook Notifications
To configure webhook notifications in Server Scout:
- Navigate to your Notification Settings in the dashboard
- Click Add New Webhook in the webhook notifications section
- Enter your webhook URL in the Endpoint URL field
- Optionally, add custom headers if your endpoint requires authentication
- Select which alert types should trigger the webhook (critical, warning, recovery)
- Save your configuration
Your webhook will now receive notifications whenever monitored services match your specified criteria.
Understanding the JSON Payload
Server Scout sends webhook notifications as HTTP POST requests with a JSON payload. Here's the standard format:
{
"alert_id": "12345",
"server_name": "web-server-01",
"service": "HTTP",
"status": "down",
"message": "HTTP service is not responding on port 80",
"timestamp": "2024-01-15T10:30:00Z",
"severity": "critical",
"server_ip": "192.168.1.100",
"duration": "00:05:23"
}
Key fields include:
status: Either "down", "warning", or "recovered"severity: "critical", "warning", or "info"duration: How long the issue has persistedservernameandserverip: Identify the affected server
Integrating with Popular Services
Slack Integration
For Slack incoming webhooks:
- Create an incoming webhook in your Slack workspace
- Use the provided webhook URL in Server Scout
- Slack will automatically format the JSON into readable messages
Discord Integration
Discord webhook setup is straightforward:
- In your Discord channel settings, create a webhook
- Copy the webhook URL to Server Scout
- Discord will display Server Scout alerts as embedded messages
Microsoft Teams
For Teams integration:
- Add an "Incoming Webhook" connector to your Teams channel
- Configure the webhook name and image
- Use the generated URL in Server Scout's webhook settings
Teams will format the alerts into attractive card notifications.
PagerDuty Integration
To integrate with PagerDuty:
- Create an integration in your PagerDuty service using the "Events API v2"
- Use the integration URL as your webhook endpoint
- Configure custom headers with your integration key:
`` Content-Type: application/json Authorization: Token token=YOURINTEGRATIONKEY ``
Testing Your Webhook
Server Scout provides a built-in webhook testing feature:
- Navigate to your webhook configuration
- Click the Test Webhook button
- Server Scout will send a sample payload to your endpoint
- Verify the notification appears in your target system
You can also test webhooks manually using curl:
curl -X POST https://your-webhook-url.com \
-H "Content-Type: application/json" \
-d '{"status":"down","server_name":"test-server","message":"Test alert"}'
Troubleshooting Webhook Delivery
If webhooks aren't being delivered:
Check the endpoint URL: Ensure your webhook URL is publicly accessible and accepts POST requests.
Verify SSL certificates: Server Scout requires valid SSL certificates for HTTPS endpoints. Self-signed certificates will cause delivery failures.
Review response codes: Your endpoint must return a 2xx HTTP status code. Redirects, 4xx, or 5xx responses indicate delivery failure.
Check firewall settings: Ensure your firewall allows incoming connections from Server Scout's IP addresses.
Monitor timeout issues: Webhook endpoints must respond within 10 seconds, or the delivery will timeout.
Review payload format: Some services expect specific JSON structures. You may need to use a webhook proxy or transformation service to convert Server Scout's payload format.
Server Scout logs webhook delivery attempts, including response codes and error messages, in your notification history for debugging purposes.
Frequently Asked Questions
How do I set up webhook notifications in ServerScout?
What is a webhook notification?
Why are my webhooks not being delivered?
How do I integrate ServerScout with Slack?
What information is included in webhook notifications?
How can I test if my webhook is working?
Can I integrate ServerScout webhooks with PagerDuty?
Was this article helpful?