A Scouter APM server plugin that sends alert notifications to Discord via webhook.
Based on scouter-plugin-server-null.
- Server Alert - Forwards Scouter server alerts to Discord with color-coded embeds
- CPU usage (Warning / Fatal)
- Memory usage (Warning / Fatal)
- Disk usage (Warning / Fatal)
- Agent connect / disconnect / reconnect
- Any other alerts generated by Scouter
- Slow API Detection - Monitors XLog and notifies when API response time exceeds the configured threshold
-
Build the plugin:
./gradlew build
-
Copy the built JAR to the Scouter server plugin directory:
cp build/libs/scouter-plugin-server-alert-discord.jar /path/to/scouter-server/lib/
-
Add the following properties to
scouter.confon your Scouter server:# (Required) Discord webhook URL ext_plugin_discord_webhook_url=https://discord.com/api/webhooks/your-webhook-url # (Optional) Timezone for timestamps (default: UTC) ext_plugin_discord_timezone=UTC # (Optional) Enable slow API detection via XLog (default: false) ext_plugin_discord_xlog_enabled=false # (Optional) Response time threshold in ms for slow API alerts (default: 2000) ext_plugin_discord_xlog_elapsed_threshold=2000
-
Restart the Scouter server.
Triggered when Scouter detects a server alert (CPU, Memory, GC, etc.).
| Field | Description |
|---|---|
| Time | Alert timestamp |
| Level | Info / Warn / Error / Fatal |
| Agent | Scouter agent name |
| Title | Alert title |
| Message | Alert message detail |
Triggered when an API response time exceeds the configured threshold.
| Field | Description |
|---|---|
| Time | Detection timestamp |
| Agent | Scouter agent name |
| API | HTTP method + endpoint |
| Elapsed | Response time in ms |
- Scouter Server 1.8.x+
- Java 8+
This project is licensed under the Apache License 2.0.
Based on Scouter APM and scouter-plugin-server-null.