Skip to content

Webhooks Integration

Laritor supports custom webhook integrations to deliver alert data to any external system or service that accepts POST requests. This is ideal for routing alerts to your own APIs, internal tools, or third-party platforms not natively integrated with Laritor.

  1. Go to Alerts

    • Click on Alerts in the left navigation menu.
    • Click the Create Alert button.
  2. Enable Webhook Channel

    • On the alert creation form, toggle the Webhooks option under “Notification Channels.”
  3. Enter Your Webhook URL

    • A field will appear prompting you to enter a valid webhook URL.
    • Paste your target webhook URL (must support HTTP POST).
  4. Save the Alert

    • Once saved, Laritor will send a webhook request whenever this alert is triggered.

  • Method: POST
  • Content-Type: application/json
  • User-Agent: laritor-bot
  • Payload Format: JSON (see below)

The payload includes metadata about the alert, application, and environment. If the alert is triggered by an exceptions resource, an exceptions array is also included.

{
"application_id": "application id",
"application": "application name",
"environment_id": "environment id",
"environment": "environment name",
"alert_id": "alert id",
"alert": "alert name",
"resource": "resource name (e.g. requests, queries, jobs, exceptions, etc.)",
"criteria": "alert trigger criteria (e.g. Avg Request Duration ≥ 500ms for 5 Minutes)",
"value": "triggered value (e.g. 625)",
"exceptions": [
{
"id": "exception id",
"message": "exception message",
"file": "file name",
"line": "line number",
"total": "total occurrences"
}
]
}

ℹ️ Note: The exceptions field is only included when the resource is exceptions.

{
"application_id": "1",
"application": "Weather API",
"environment_id": "1",
"environment": "production",
"alert_id": "1",
"alert": "High API Failure Rate",
"resource": "requests",
"criteria": "When Total Requests with 5xx status code is Greater Than or Equal To 10 for 1 Minute",
"value": "17"
}
{
"application_id": "1",
"application": "Weather API",
"environment_id": "1",
"environment": "production",
"alert_id": "1",
"alert": "High Exception Rate",
"resource": "exceptions",
"criteria": "When Total Exceptions is Greater Than or Equal To 3 for 5 Minutes",
"value": "54",
"exceptions": [
{
"id": "1",
"message": "Call to undefined function",
"file": "/var/www/app/Handlers/ErrorHandler.php",
"line": "78",
"total": "54"
}
]
}
  • Integrate with PagerDuty or your custom incident system
  • Log alerts to your internal analytics platform
  • Trigger CI/CD pipelines, feature flags, or rollback tools
  • Feed alerts into dashboards or custom UI components