Explore documentation
Incident log drain
Incident log drain
The incident log drain allows you to send detailed audit logs of various events related to your monitors, heartbeats, and incidents to an external logging service via webhooks. Each event is formatted as a JSON payload, providing comprehensive information about what happened, when, and to which resource.
We send each event as a POST request with the Content-Type: application/json; charset=utf-8 header and any request headers you set on the drain. A request times out after 25 seconds, and we retry a failed request up to 3 times.
Each payload includes common fields:
| Field | Type | Description |
|---|---|---|
dt |
String | ISO 8601 formatted timestamp of when the event occurred. |
event |
String | The type of event, such as monitor.created or incident.started. |
message |
String | A human-readable message describing the event. |
organization_id |
Integer | The Better Stack ID of the organization the event originated from. |
team_id |
Integer | The Better Stack ID of the team the event originated from. |
Monitor events
Events related to your uptime monitors.
monitor.created
Triggered when a monitor is created.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
monitor.down
Triggered when a monitor goes down.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
cause |
String | The cause of the downtime. |
regions |
Array | The regions the monitor is checked from: us, eu, as, or au. null when the monitor uses the default regions. |
monitor.paused
Triggered when a monitor is paused.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
monitor.removed
Triggered when a monitor is deleted.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
monitor.unpaused
Triggered when a monitor is unpaused.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
monitor.up
Triggered when a monitor without a recovery period comes back up.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
monitor.updated
Triggered when the URL, name, or type of a monitor changes.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
monitor.validating
Triggered when a monitor with a recovery period comes back up and starts verifying its recovery.
| Field | Type | Description |
|---|---|---|
monitor_id |
Integer | The ID of the monitor. |
monitor_url |
String | The URL being monitored. |
monitor_name |
String | The name of the monitor. |
monitor_type |
String | The type of monitor, such as status, keyword, or ping. |
Heartbeat events
Events related to your heartbeats.
heartbeat.created
Triggered when a heartbeat is created.
| Field | Type | Description |
|---|---|---|
heartbeat_id |
Integer | The ID of the heartbeat. |
heartbeat_name |
String | The name of the heartbeat. |
heartbeat.down
Triggered when a heartbeat goes down because it was missed.
| Field | Type | Description |
|---|---|---|
heartbeat_id |
Integer | The ID of the heartbeat. |
heartbeat_name |
String | The name of the heartbeat. |
heartbeat.paused
Triggered when a heartbeat is paused.
| Field | Type | Description |
|---|---|---|
heartbeat_id |
Integer | The ID of the heartbeat. |
heartbeat_name |
String | The name of the heartbeat. |
heartbeat.removed
Triggered when a heartbeat is deleted.
| Field | Type | Description |
|---|---|---|
heartbeat_id |
Integer | The ID of the heartbeat. |
heartbeat_name |
String | The name of the heartbeat. |
heartbeat.unpaused
Triggered when a heartbeat is unpaused.
| Field | Type | Description |
|---|---|---|
heartbeat_id |
Integer | The ID of the heartbeat. |
heartbeat_name |
String | The name of the heartbeat. |
heartbeat.up
Triggered when a heartbeat comes back up.
| Field | Type | Description |
|---|---|---|
heartbeat_id |
Integer | The ID of the heartbeat. |
heartbeat_name |
String | The name of the heartbeat. |
heartbeat.updated
Triggered when a heartbeat is renamed.
| Field | Type | Description |
|---|---|---|
heartbeat_id |
Integer | The ID of the heartbeat. |
heartbeat_name |
String | The name of the heartbeat. |
Incident events
Events related to incidents.
Every incident event includes the resource causing the incident. resource_type is one of monitor, heartbeat, webhook_integration, email_integration, incoming_webhook, amazon_sns_integration, call_routing, or logs_chart. resource_type, resource_id, and resource_name are null for incidents without a resource, such as manually created incidents.
incident.acknowledged
Triggered when an incident is acknowledged.
| Field | Type | Description |
|---|---|---|
incident_id |
Integer | The ID of the incident. |
incident_name |
String | The name of the incident. |
resource_type |
String | The type of resource causing the incident, such as monitor or heartbeat. |
resource_id |
Integer | The ID of the resource causing the incident. |
resource_name |
String | The name of the resource causing the incident. |
user_email |
String | The e-mail of the user who acknowledged the incident, if applicable. |
user_name |
String | The name of the user who acknowledged the incident, if applicable. |
integration_name |
String | The name of the integration that acknowledged the incident, if applicable. |
integration_type |
String | The type of integration that acknowledged the incident, if applicable. |
time_to_acknowledge |
Integer | Seconds from the start of the incident to its acknowledgement. |
incident.escalated
Triggered when an incident is escalated.
| Field | Type | Description |
|---|---|---|
incident_id |
Integer | The ID of the incident. |
incident_name |
String | The name of the incident. |
resource_type |
String | The type of resource causing the incident. |
resource_id |
Integer | The ID of the resource causing the incident. |
resource_name |
String | The name of the resource causing the incident. |
escalation_targets |
Array | An array of objects, each describing an escalation target. Each object has a type of user, team, schedule, policy, or organisation, plus id and name. |
incident.grouped
Triggered when an incident is grouped.
| Field | Type | Description |
|---|---|---|
incident_id |
Integer | The ID of the incident. |
incident_name |
String | The name of the incident. |
resource_type |
String | The type of resource causing the incident. |
resource_id |
Integer | The ID of the resource causing the incident. |
resource_name |
String | The name of the resource causing the incident. |
incident_group_id |
Integer | The ID of the incident group the incident was added to. |
incident.removed
Triggered when an incident is deleted.
| Field | Type | Description |
|---|---|---|
incident_id |
Integer | The ID of the incident. |
incident_name |
String | The name of the incident. |
resource_type |
String | The type of resource causing the incident. |
resource_id |
Integer | The ID of the resource causing the incident. |
resource_name |
String | The name of the resource causing the incident. |
incident.reopened
Triggered when an incident is reopened.
| Field | Type | Description |
|---|---|---|
incident_id |
Integer | The ID of the incident. |
incident_name |
String | The name of the incident. |
resource_type |
String | The type of resource causing the incident. |
resource_id |
Integer | The ID of the resource causing the incident. |
resource_name |
String | The name of the resource causing the incident. |
user_email |
String | The e-mail of the user who reopened the incident, if applicable. |
user_name |
String | The name of the user who reopened the incident, if applicable. |
integration_name |
String | The name of the integration that reopened the incident, if applicable. |
integration_type |
String | The type of integration that reopened the incident, if applicable. |
incident.resolved
Triggered when an incident is resolved.
| Field | Type | Description |
|---|---|---|
incident_id |
Integer | The ID of the incident. |
incident_name |
String | The name of the incident. |
resource_type |
String | The type of resource causing the incident. |
resource_id |
Integer | The ID of the resource causing the incident. |
resource_name |
String | The name of the resource causing the incident. |
user_email |
String | The e-mail of the user who resolved the incident, if applicable. |
user_name |
String | The name of the user who resolved the incident, if applicable. |
integration_name |
String | The name of the integration that resolved the incident, if applicable. |
integration_type |
String | The type of integration that resolved the incident, if applicable. |
time_to_resolve |
Integer | Seconds from the start of the incident to its resolution. |
incident.started
Triggered when an incident starts.
| Field | Type | Description |
|---|---|---|
incident_id |
Integer | The ID of the incident. |
incident_name |
String | The name of the incident. |
resource_type |
String | The type of resource causing the incident. |
resource_id |
Integer | The ID of the resource causing the incident. |
resource_name |
String | The name of the resource causing the incident. |
incident_cause |
String | The cause of the incident. |
regions |
Array | The regions the monitor is checked from: us, eu, as, or au. null for incidents not caused by a monitor, or when the monitor uses the default regions. |
escalation_policy_id |
Integer | The ID of the escalation policy triggered by the incident, if applicable. |
Test event
Triggered when you click Send a test log in the drain settings.
| Field | Type | Description |
|---|---|---|
integration_name |
String | The name of the incident log drain. |