Skip to content

Webhook Documentation

Maattt GoobyFRS edited this page Dec 5, 2026 · 3 revisions

GoobyDesk supports both outbound webhook notifications (sending ticket events to chat platforms) and inbound webhook ingestion (creating tickets automatically from third-party monitoring tools).

Outbound Notifications

Public ticket submissions, the supported inbound webhook routes, and ticket status updates call the outbound notification handler (local_handlers/local_webhook_handler.py). The media request route does not call it. Discord and Slack receive a short embed/attachment.

Configuration mismatch: the sender reads webhooks.discord and webhooks.slack, but the shipped template_configuration.yml defines discord and slack at the top level. The template as shipped will not enable notifications. Add the nesting the sender expects to the deployed configuration:

webhooks:
  discord:
    enabled: false
    webhook_url: ""
  slack:
    enabled: false
    webhook_url: ""

Set the relevant enabled value and URL when configuring a platform. Keep webhook URLs private.

Discord

  • Config keys: webhooks.discord.enabled, webhooks.discord.webhook_url in configuration.yml
  • Sends an embed titled New Ticket: <number> - Subject: <subject> for new tickets, or Ticket: <number> updated — Status: <status> for updates
  • Blue accent color for new tickets, yellow for status updates

Slack

  • Config keys: webhooks.slack.enabled, webhooks.slack.webhook_url in configuration.yml
  • Sends an attachment using the same title format and color scheme as Discord

Microsoft Teams

  • A top-level teams365 section is present in template_configuration.yml, but the sender is commented out and not functional.

Behavior Notes

  • Notifications are best-effort: request failures are logged and do not block ticket creation/updates. Some callers log a success message even if a sender returns failure.
  • Each platform is checked independently via enabled flags; disabled platforms are skipped
  • Requests use a 5 second timeout and are sent as a simple POST with a JSON payload
  • The sender treats any status equal to open (case-insensitive) as a new-ticket event, including a status update back to Open.

Inbound Webhook Ingestion

Inbound endpoints live under the /api blueprint (blueprints/api_module.py) and automatically create tickets from external systems. They are unauthenticated, so restrict access at the network/reverse-proxy layer. The sample TAILSCALE_WEBHOOK_KEY is not checked by the Tailscale endpoint.

POST /api/tailscale

  • Creates a Change request ticket from any Tailscale webhook payload
  • Requestor is set to Tailscale; notification email comes from email.tailscale_notify_email
  • Impact/Urgency default to Medium

POST /api/uptime-kuma

  • Creates an Incident ticket for Uptime-Kuma heartbeat events
  • Only DOWN (status 0) and PENDING (status 2) heartbeats create tickets; UP and MAINTENANCE are ignored
  • DOWN events are High impact/urgency; PENDING events are Medium impact/urgency
  • Requestor is set to Uptime Kuma

POST /api/librenms

  • Creates an Incident ticket from LibreNMS's default alert-transport payload
  • Only newly-triggered alerts (state == 1) create a ticket; recoveries/acknowledgements are ignored
  • critical severity maps to High impact/urgency, otherwise Medium
  • Requestor is set to LibreNMS; notification email comes from email.librenms_notify_email

GET /api/status

  • Simple health/identification endpoint
  • Returns {"is_GoobyDesk": true, "installed": true, "edition": "community", "license_key": null}

Common Behavior for Inbound Endpoints

  • Successful ingestion returns {"status": "success", "ticket": "<ticket_number>"}
  • Untracked states/statuses return {"status": "ignored", "reason": "..."} with HTTP 200
  • LibreNMS rejects non-JSON and empty bodies with HTTP 400. Uptime Kuma rejects non-JSON content types with HTTP 400. Other malformed JSON or unexpected payload shapes may reach the broad exception handler and return HTTP 500; do not assume all bad input returns 400.
  • Unexpected errors are logged with a correlation ID and return a generic HTTP 500 response. Traceback details can appear in server logs.
  • Full inbound payloads are saved in ticket records. Avoid including secrets in webhook bodies and protect ticket data.
  • Each successfully ingested webhook attempts the outbound notification flow described above.

Clone this wiki locally