PagerDuty

PagerDuty

Triggers, acknowledges or resolves a PagerDuty incident

Configuration

OptionDescription
Routing key
Type: string
Required: True

The Events API v2 integration key from your PagerDuty service.

Region
Type: choice
Required: True

The PagerDuty service region your account runs in. A routing key only works in its own region.

Event action
Type: choice
Required: True

Trigger opens an incident. Acknowledge and resolve update the incident with the same dedup key.

Dedup key
Type: string
Required: False

Events with the same key update one incident. Acknowledge and resolve need it. If you leave it empty, PagerDuty opens a new incident for each trigger.

Summary
Type: string
Required: True

The incident title. PagerDuty keeps the first 1024 characters.

Source
Type: string
Required: True

The system that has the problem.

Severity
Type: choice
Required: True

Any other value is sent as error.

Component
Type: string
Required: False

The part of the source system that has the problem.

Class
Type: string
Required: False

The type of the event, for example firing.

Custom details
Type: json
Required: False

Extra data that PagerDuty shows on the incident and can use in event rules.

Links
Type: json
Required: False

A list of links with href and text that PagerDuty shows on the incident.

Using our REST API you can create this destination like so:

Terminal
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
"type": "destination",
"name": "PagerDuty",
"inputs": {
"routing_key": {
"value": ""
},
"region": {
"value": ""
},
"event_action": {
"value": ""
},
"summary": {
"value": ""
},
"source": {
"value": ""
},
"severity": {
"value": ""
}
},
"enabled": true,
"template_id": "template-pagerduty"
}'