Skip to content

Add webhook notification channel#39

Merged
venelinkochev merged 1 commit into
mainfrom
feat/webhook-notifications
May 14, 2026
Merged

Add webhook notification channel#39
venelinkochev merged 1 commit into
mainfrom
feat/webhook-notifications

Conversation

@venelinkochev

Copy link
Copy Markdown
Contributor

Introduce a new Webhook notification channel with HMAC-SHA256-signed JSON deliveries.

  • Add Webhook enum value and ordering (NotificationChannelType).
  • Implement WebhookChannel to POST JSON payloads (10s timeout) with headers X-EasyMonitor-Event and X-EasyMonitor-Signature (sha256=) and log failures.
  • Add toWebhook payloads for MonitorDown and MonitorRecovered (event, monitor, checked_at, dashboard_url, error when present).
  • Expose routeNotificationForWebhook and webhookSecret helpers on NotificationChannel and mark channel as configured only when url+secret present.
  • Add Livewire UI + blade controls for creating, editing, deleting, copying/regenerating secrets, and validation (url rules, label max length).
  • Generate a 64-char secret on creation; preserve secret on edits; provide regeneration action.
  • Add factory support and unit/feature tests covering creation, validation, signing, delivery, skipping when missing config.
  • Update README with webhook docs: payload schema, signature verification examples, headers, and delivery semantics.

Introduce a new Webhook notification channel with HMAC-SHA256-signed JSON deliveries.

- Add Webhook enum value and ordering (NotificationChannelType).
- Implement WebhookChannel to POST JSON payloads (10s timeout) with headers X-EasyMonitor-Event and X-EasyMonitor-Signature (sha256=<hex>) and log failures.
- Add toWebhook payloads for MonitorDown and MonitorRecovered (event, monitor, checked_at, dashboard_url, error when present).
- Expose routeNotificationForWebhook and webhookSecret helpers on NotificationChannel and mark channel as configured only when url+secret present.
- Add Livewire UI + blade controls for creating, editing, deleting, copying/regenerating secrets, and validation (url rules, label max length).
- Generate a 64-char secret on creation; preserve secret on edits; provide regeneration action.
- Add factory support and unit/feature tests covering creation, validation, signing, delivery, skipping when missing config.
- Update README with webhook docs: payload schema, signature verification examples, headers, and delivery semantics.
@venelinkochev venelinkochev merged commit 7396d80 into main May 14, 2026
2 checks passed
@venelinkochev venelinkochev deleted the feat/webhook-notifications branch May 14, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant