Skip to content

Webhooks

shvquu edited this page Jun 22, 2026 · 2 revisions

Webhooks

The serverdoctor-webhook module pushes diagnostic alerts to Discord, Slack and Microsoft Teams. It uses the JDK HTTP client, so it adds no external dependencies.

Enabling

webhooks:
  enabled: true
  # Only notify when the overall status reaches this severity or higher.
  min-severity: HIGH    # INFO | LOW | MEDIUM | HIGH | CRITICAL
  targets:
    - type: discord     # discord | slack | teams
      name: "ops"
      url: "https://discord.com/api/webhooks/…"
    - type: slack
      name: "alerts"
      url: "https://hooks.slack.com/services/…"
    - type: teams
      name: ""
      url: "https://…webhook.office.com/…"

Targets with an empty url are skipped. You can list multiple targets of the same type.

When does it fire?

ServerDoctor runs a full analysis on a configurable interval (120 s by default on Paper/Folia), and the engine emits per-finding events on every run. To avoid spamming your channels, the webhook does not react to those. Instead it listens to the end-of-run summary and fires only on a state change:

  • New / worse — the overall status reaches min-severity and the set of conflicts/risks changed since the last alert.
  • Recovered — a single notice when the status drops back below min-severity.

So an ongoing HIGH state is announced once, not on every scan.

Message format

Service Format
Discord an embed (title, description, severity color)
Slack an attachment with a colored bar
Teams a legacy MessageCard

The color follows the severity (green → blue → yellow → orange → red).

Microsoft Teams note

Microsoft is deprecating Office-365-connector webhooks (the classic "Incoming Webhook" in a Teams channel). For new setups, create a Power Automate workflow with an HTTP-request trigger — it accepts the same JSON POST and works with the teams target.

Troubleshooting

  • Failed deliveries are logged (e.g. Webhook DISCORD (ops) returned HTTP 404). Check the URL.
  • Make sure min-severity isn't higher than the conditions you want to hear about.
  • Webhooks work on Paper/Folia, Velocity and BungeeCord; on a network, enable them where the analysis you care about runs (proxy and/or backend servers).

Clone this wiki locally