PagerDuty
Synopsis
Sends incident alerts to PagerDuty using the Events API v2, supporting event actions (trigger, acknowledge, resolve), severity levels, deduplication keys, and custom details for incident management.
Schema
- pagerduty:
routing_key: <string>
summary: <string>
event_action: <string>
dedup_key: <string>
source: <string>
severity: <string>
component: <string>
group: <string>
class: <string>
custom_details: <map>
client: <string>
client_url: <string>
images: <image[]>
links: <link[]>
description: <text>
if: <script>
ignore_failure: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
| Field | Required | Default | Description |
|---|---|---|---|
routing_key | N | ${PAGERDUTY_ROUTING_KEY} | PagerDuty integration key (routing key) |
summary | Y | - | Brief description of the incident |
event_action | N | trigger | Action to perform: trigger, acknowledge, or resolve |
dedup_key | N | - | Deduplication key to correlate trigger, acknowledge, and resolve events |
source | N | - | Source of the event (e.g., hostname, service name) |
severity | N | info | Severity level: critical, error, warning, or info |
component | N | - | Component of the source machine responsible for the event |
group | N | - | Logical grouping of components |
class | N | - | Type or classification of the event |
custom_details | N | - | Map of additional details to include with the incident |
client | N | VirtualMetric | Name of the monitoring client |
client_url | N | https://www.virtualmetric.com | URL of the monitoring client |
images | N | - | Array of image objects with src, href, and alt fields |
links | N | - | Array of link objects with href and text fields |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
The pagerduty processor sends incident alerts to PagerDuty using the Events API v2.
Event Actions: Control incident lifecycle through event actions:
trigger: Create a new incident or add to an existing open incident with the same dedup_keyacknowledge: Acknowledge an open incident (prevents escalation)resolve: Close an open incident
Deduplication Keys: The dedup_key field correlates related events. Multiple triggers with the same dedup_key are grouped into one incident. Use templates to create dynamic keys based on event data (e.g., cpu-{{ .server }}).
Severity Levels: Visual and behavioral indicators in PagerDuty:
critical: Highest severity, immediate attention requirederror: Error condition requiring attentionwarning: Potential issue, monitoring recommendedinfo: Informational message
Custom Details: The custom_details map passes additional context to responders. Values support template syntax for dynamic content.
Images and Links: Enrich incidents with visual context and quick navigation:
- Images: Include
src(required),href, andaltfields - Links: Include
href(required) andtextfields
Template Support: All string fields support Go template syntax with event field interpolation using {{ .field_name }}.
For integration patterns with schema validation, see Schema Drift Detection.
Examples
Basic Alert
Triggering a critical incident... | |
Critical incident created in PagerDuty... |
Resolve Incident
Resolving a previously triggered incident... | |
Incident with matching dedup_key is resolved... |
With Custom Details
Including additional context in the incident... | |
Custom details appear in incident timeline... |
With Images and Links
Adding visual context and navigation links... | |
Incident includes embedded image and dashboard link... |
Schema Drift Alert
Alerting on schema validation failures... | |
PagerDuty incident triggered when schema validation fails... |