Webhook Notifications

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:

  1. Navigate to your Notification Settings in the dashboard
  2. Click Add New Webhook in the webhook notifications section
  3. Enter your webhook URL in the Endpoint URL field
  4. Optionally, add custom headers if your endpoint requires authentication
  5. Select which alert types should trigger the webhook (critical, warning, recovery)
  6. 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 persisted
  • servername and serverip: Identify the affected server

Integrating with Popular Services

Slack Integration

For Slack incoming webhooks:

  1. Create an incoming webhook in your Slack workspace
  2. Use the provided webhook URL in Server Scout
  3. Slack will automatically format the JSON into readable messages

Discord Integration

Discord webhook setup is straightforward:

  1. In your Discord channel settings, create a webhook
  2. Copy the webhook URL to Server Scout
  3. Discord will display Server Scout alerts as embedded messages

Microsoft Teams

For Teams integration:

  1. Add an "Incoming Webhook" connector to your Teams channel
  2. Configure the webhook name and image
  3. 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:

  1. Create an integration in your PagerDuty service using the "Events API v2"
  2. Use the integration URL as your webhook endpoint
  3. 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:

  1. Navigate to your webhook configuration
  2. Click the Test Webhook button
  3. Server Scout will send a sample payload to your endpoint
  4. 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?

Navigate to your Notification Settings in the dashboard, click 'Add New Webhook', enter your endpoint URL, optionally add custom headers for authentication, select which alert types should trigger the webhook (critical, warning, recovery), and save your configuration.

What is a webhook notification?

Webhooks are HTTP callbacks that ServerScout sends to your specified URL when monitoring events occur. They provide real-time notifications that push alert data directly to your applications, chat platforms, or incident management systems the moment an issue is detected or resolved.

Why are my webhooks not being delivered?

Common webhook delivery issues include invalid or inaccessible endpoint URLs, invalid SSL certificates for HTTPS endpoints, endpoints returning non-2xx HTTP status codes, firewall blocking connections, timeout issues (endpoints must respond within 10 seconds), or incorrect payload format expectations.

How do I integrate ServerScout with Slack?

Create an incoming webhook in your Slack workspace, copy the provided webhook URL, and paste it into ServerScout's webhook settings. Slack will automatically format the JSON payload into readable messages in your designated channel.

What information is included in webhook notifications?

ServerScout webhook payloads include alert_id, server_name, service, status (down/warning/recovered), message, timestamp, severity (critical/warning/info), server_ip, and duration. The payload is sent as an HTTP POST request with JSON format.

How can I test if my webhook is working?

Use ServerScout's built-in webhook testing feature by navigating to your webhook configuration and clicking 'Test Webhook'. This sends a sample payload to your endpoint so you can verify the notification appears in your target system.

Can I integrate ServerScout webhooks with PagerDuty?

Yes, create an integration in your PagerDuty service using the 'Events API v2', use the integration URL as your webhook endpoint, and configure custom headers with your integration key including 'Content-Type: application/json' and your authorization token.

Was this article helpful?