Broadly, webhooks fall into two categories:
- Agent-initiated webhooks, like opening or closing an alert.
- System-triggered webhooks, like when a rule triggers an alert.
Each webhook event sends a specific JSON request body to the URL you configured.
Webhooks send a maximum of three requests
When it sends webhooks requests, Unit21 sends a maximum of 3 requests for a single webhook. A retry is attempted when a status code between 400 and 600 is received or if an error occurred when attempting the request (ex. the server refusing a connection).
If the first attempt fails, the Unit21 system waits one second before attempting the webhook request a second time. If the second retry fails, the system waits 2 seconds before retrying a third time. On the dashboard page for the specific webhook, it displays the number of retries attempted, along with the request's unique callback_id
.