Webhooks enable your applications to receive real-time notifications when events occur in your monitoring and observability systems. This eliminates the need for polling and ensures your systems stay synchronized with alerts, metrics, and infrastructure changes across all integrated platforms.
Unizo normalizes webhook events from Datadog, New Relic, Splunk, Prometheus, Grafana, and other observability providers into a consistent format. This means you write your webhook handler once and it works with all supported platforms.
Webhook Configuration To set up webhooks for your integration, visit the Unizo Console Webhooks section for step-by-step configuration guide.
Supported Event Types
These are the event types currently supported by Unizo's Observability webhooks. The list keeps growing as we add support for more events across different platforms.
Event Type Description Trigger Conditions alert:triggered An alert has been triggered Threshold breach, anomaly detection, or custom conditions alert:resolved An alert has been resolved Metrics return to normal or manual resolution alert:acknowledged An alert has been acknowledged User acknowledges the alert monitor:created A new monitor has been created Monitor creation via UI or API monitor:updated Monitor configuration has been modified Threshold, condition, or notification changes monitor:deleted A monitor has been deleted Monitor removal from the system dashboard:created A new dashboard has been created Dashboard creation via UI or API dashboard:updated Dashboard has been modified Widget additions, layout changes, or filter updates metric:anomaly_detected Anomaly detected in metrics ML-based anomaly detection or statistical deviation
Webhook Security All webhooks from Unizo include security headers to verify authenticity:
Headers Header Description x-unizo-event-typeThe type of event that triggered the webhook x-unizo-signatureHMAC SHA-256 signature for request validation x-unizo-timestampUnix timestamp when the event was sent x-unizo-delivery-idUnique identifier for this webhook delivery
Signature Verification Verify the authenticity of incoming webhooks using HMAC SHA-256:
const crypto = require('crypto');
function verifyWebhookSignature(payload, signature, secret) {
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature, 'hex'),
Buffer.from(expectedSignature, 'hex')
);
}
Event Details
Alert Events
Event Type Description Trigger Conditions alert:triggered An alert has been triggered Threshold breach, anomaly detection, or custom conditions alert:resolved An alert has been resolved Metrics return to normal or manual resolution alert:acknowledged An alert has been acknowledged User acknowledges the alert
Triggered when an alert condition is met in the monitoring system
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: alert:triggered x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery ID for idempotency x-unizo-signaturestring Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version alert.idstring Yes Unique alert identifier alert.namestring Yes Alert name alert.descriptionstring No Alert description alert.severitystring Yes Severity level: critical, high, medium, low alert.statusstring Yes Current status: triggered, acknowledged, resolved alert.metricobject Yes Metric that triggered the alert alert.thresholdobject Yes Threshold configuration alert.triggeredDateTimestring Yes ISO 8601 timestamp alert.tagsarray No Associated tags integrationobject Yes Integration details
Example Payload Copy {
"type" : "alert:triggered" ,
"version" : "1.0.0" ,
"alert" : {
"id" : "alert-123456" ,
"name" : "High CPU Usage - Production Server" ,
"description" : "CPU usage exceeded 90% for more than 5 minutes" ,
"severity" : "critical" ,
"status" : "triggered" ,
"metric" : {
"name" : "system.cpu.usage" ,
"value" : 92.5 ,
"unit" : "percentage" ,
"host" : "prod-web-01"
} ,
"threshold" : {
"operator" : "greater_than" ,
"value" : 90 ,
"duration" : "5m"
} ,
"triggeredDateTime" : "2024-01-15T14:00:00Z" ,
"tags" : [
"production" ,
"web-server" ,
"critical"
]
} ,
"integration" : {
"type" : "OBSERVABILITY" ,
"id" : "int_123456" ,
"name" : "Datadog Production" ,
"provider" : "datadog"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Triggered when an alert condition is no longer met
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: alert:resolved x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery ID for idempotency x-unizo-signaturestring Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version alert.idstring Yes Unique alert identifier alert.namestring Yes Alert name alert.severitystring Yes Severity level alert.statusstring Yes Current status: resolved alert.durationstring Yes How long the alert was active alert.resolvedDateTimestring Yes ISO 8601 timestamp alert.resolvedBystring Yes Resolution method: auto, manual integrationobject Yes Integration details
Example Payload Copy {
"type" : "alert:resolved" ,
"version" : "1.0.0" ,
"alert" : {
"id" : "alert-123456" ,
"name" : "High CPU Usage - Production Server" ,
"severity" : "critical" ,
"status" : "resolved" ,
"duration" : "15m30s" ,
"resolvedDateTime" : "2024-01-15T14:15:30Z" ,
"resolvedBy" : "auto" ,
"metric" : {
"name" : "system.cpu.usage" ,
"value" : 75.2 ,
"unit" : "percentage" ,
"host" : "prod-web-01"
}
} ,
"integration" : {
"type" : "OBSERVABILITY" ,
"id" : "int_123456" ,
"name" : "Datadog Production" ,
"provider" : "datadog"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Triggered when a user acknowledges an alert
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: alert:acknowledged x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery ID for idempotency x-unizo-signaturestring Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version alert.idstring Yes Unique alert identifier alert.namestring Yes Alert name alert.statusstring Yes Current status: acknowledged acknowledgment.notestring No Acknowledgment note acknowledgment.acknowledgedByobject Yes User who acknowledged acknowledgment.acknowledgedDateTimestring Yes ISO 8601 timestamp integrationobject Yes Integration details
Example Payload Copy {
"type" : "alert:acknowledged" ,
"version" : "1.0.0" ,
"alert" : {
"id" : "alert-123456" ,
"name" : "High CPU Usage - Production Server" ,
"status" : "acknowledged"
} ,
"acknowledgment" : {
"note" : "Investigating the issue, likely due to traffic spike" ,
"acknowledgedBy" : {
"id" : "user-789" ,
"email" : "ops@example.com" ,
"name" : "John Ops"
} ,
"acknowledgedDateTime" : "2024-01-15T14:05:00Z"
} ,
"integration" : {
"type" : "OBSERVABILITY" ,
"id" : "int_123456" ,
"name" : "PagerDuty" ,
"provider" : "pagerduty"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Monitor Events
Event Type Description Trigger Conditions monitor:created A new monitor has been created Monitor creation via UI or API monitor:updated Monitor configuration has been modified Threshold, condition, or notification changes monitor:deleted A monitor has been deleted Monitor removal from the system
Triggered when a new monitor is created in the observability system
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: monitor:created x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery ID for idempotency x-unizo-signaturestring Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version monitor.idstring Yes Unique monitor identifier monitor.namestring Yes Monitor name monitor.typestring Yes Monitor type: metric, log, synthetic monitor.querystring Yes Monitor query or condition monitor.thresholdsobject Yes Alert thresholds monitor.createdDateTimestring Yes ISO 8601 timestamp monitor.createdByobject Yes User who created the monitor integrationobject Yes Integration details
Example Payload Copy {
"type" : "monitor:created" ,
"version" : "1.0.0" ,
"monitor" : {
"id" : "monitor-456" ,
"name" : "API Response Time Monitor" ,
"type" : "metric" ,
"query" : "avg(last_5m):avg:api.response_time{service:payment} > 1000" ,
"thresholds" : {
"critical" : 1000 ,
"warning" : 500
} ,
"createdDateTime" : "2024-01-15T14:00:00Z" ,
"createdBy" : {
"id" : "user-123" ,
"email" : "devops@example.com" ,
"name" : "DevOps Team"
}
} ,
"integration" : {
"type" : "OBSERVABILITY" ,
"id" : "int_123456" ,
"name" : "New Relic Production" ,
"provider" : "newrelic"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Dashboard Events
Event Type Description Trigger Conditions dashboard:created A new dashboard has been created Dashboard creation via UI or API dashboard:updated Dashboard has been modified Widget additions, layout changes, or filter updates
Triggered when a new dashboard is created
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: dashboard:created x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery ID for idempotency x-unizo-signaturestring Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version dashboard.idstring Yes Unique dashboard identifier dashboard.namestring Yes Dashboard name dashboard.descriptionstring No Dashboard description dashboard.widgetsarray Yes List of widgets dashboard.createdDateTimestring Yes ISO 8601 timestamp dashboard.createdByobject Yes User who created the dashboard integrationobject Yes Integration details
Example Payload Copy {
"type" : "dashboard:created" ,
"version" : "1.0.0" ,
"dashboard" : {
"id" : "dashboard-789" ,
"name" : "Production Overview" ,
"description" : "Main production environment metrics" ,
"widgets" : [
{
"id" : "widget-1" ,
"type" : "timeseries" ,
"title" : "CPU Usage"
} ,
{
"id" : "widget-2" ,
"type" : "heatmap" ,
"title" : "Request Distribution"
}
] ,
"createdDateTime" : "2024-01-15T14:00:00Z" ,
"createdBy" : {
"id" : "user-456" ,
"email" : "admin@example.com" ,
"name" : "Admin User"
}
} ,
"integration" : {
"type" : "OBSERVABILITY" ,
"id" : "int_123456" ,
"name" : "Grafana Cloud" ,
"provider" : "grafana"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Anomaly Events
Event Type Description Trigger Conditions metric:anomaly_detected Anomaly detected in metrics ML-based anomaly detection or statistical deviation
Triggered when an anomaly is detected in metrics
Headers Name Type Required Description Content-Typestring Yes Always application/json x-unizo-event-typestring Yes Event type: metric:anomaly_detected x-unizo-webhook-idstring Yes Unique webhook configuration ID x-unizo-delivery-idstring Yes Unique delivery ID for idempotency x-unizo-signaturestring Yes HMAC SHA-256 signature
Request Body Schema Property Type Required Description typestring Yes Event type identifier versionstring Yes Webhook payload version anomaly.idstring Yes Unique anomaly identifier anomaly.metricstring Yes Metric name anomaly.deviationnumber Yes Deviation from normal anomaly.confidencenumber Yes Confidence score (0-1) anomaly.detectedDateTimestring Yes ISO 8601 timestamp anomaly.contextobject Yes Additional context integrationobject Yes Integration details
Example Payload Copy {
"type" : "metric:anomaly_detected" ,
"version" : "1.0.0" ,
"anomaly" : {
"id" : "anomaly-123" ,
"metric" : "api.request_count" ,
"deviation" : 3.5 ,
"confidence" : 0.95 ,
"detectedDateTime" : "2024-01-15T14:00:00Z" ,
"context" : {
"expected" : 1000 ,
"actual" : 3500 ,
"service" : "payment-api" ,
"environment" : "production"
}
} ,
"integration" : {
"type" : "OBSERVABILITY" ,
"id" : "int_123456" ,
"name" : "Splunk Enterprise" ,
"provider" : "splunk"
}
}
Response 200 OKWebhook processed successfully 400 Bad RequestInvalid webhook payload 401 UnauthorizedInvalid or missing signature
Webhook Delivery & Retries
Unizo implements automatic retry logic for failed webhook deliveries:
Initial Delivery : Immediate
First Retry : After 1 minute
Second Retry : After 5 minutes
Third Retry : After 15 minutes
Final Retry : After 1 hour
Webhooks are considered failed if:
Your endpoint returns a non-2xx status code
Connection timeout (30 seconds)
SSL/TLS errors
Best Practices
1. Idempotency
Idempotent Webhook Handler async function handleWebhook(request) {
const deliveryId = request.headers['x-unizo-delivery-id'];
// Check if already processed
if (await isProcessed(deliveryId)) {
return { status: 200, message: 'Already processed' };
}
// Process webhook
await processWebhook(request.body);
// Mark as processed
await markProcessed(deliveryId);
return { status: 200 };
}
2. Async Processing
Asynchronous Processing app.post('/webhooks/observability', (req, res) => {
// Validate signature
if (!verifySignature(req)) {
return res.status(401).send('Invalid signature');
}
// Queue for processing
alertQueue.add(req.body);
// Return immediately
res.status(200).send('OK');
});
3. Alert Routing
Intelligent Alert Routing async function processAlert(payload) {
const { alert, integration } = payload;
// Route based on severity and tags
if (alert.severity === 'critical') {
await notifyPagerDuty(alert);
await createIncident(alert);
} else if (alert.tags.includes('database')) {
await notifyDatabaseTeam(alert);
} else {
await notifySlackChannel(alert);
}
// Log for audit
await logAlert(payload);
}
Need Help?
For webhook-related support: