github.com/argoproj/argo-cd/v2@v2.10.9/docs/operator-manual/notifications/services/pagerduty_v2.md (about) 1 # PagerDuty V2 2 3 ## Parameters 4 5 The PagerDuty notification service is used to trigger PagerDuty events and requires specifying the following settings: 6 7 * `serviceKeys` - a dictionary with the following structure: 8 * `service-name: $pagerduty-key-service-name` where `service-name` is the name you want to use for the service to make events for, and `$pagerduty-key-service-name` is a reference to the secret that contains the actual PagerDuty integration key (Events API v2 integration) 9 10 If you want multiple Argo apps to trigger events to their respective PagerDuty services, create an integration key in each service you want to setup alerts for. 11 12 To create a PagerDuty integration key, [follow these instructions](https://support.pagerduty.com/docs/services-and-integrations#create-a-generic-events-api-integration) to add an Events API v2 integration to the service of your choice. 13 14 ## Configuration 15 16 The following snippet contains sample PagerDuty service configuration. It assumes the service you want to alert on is called `my-service`. 17 18 ```yaml 19 apiVersion: v1 20 kind: Secret 21 metadata: 22 name: <secret-name> 23 stringData: 24 pagerduty-key-my-service: <pd-integration-key> 25 ``` 26 27 ```yaml 28 apiVersion: v1 29 kind: ConfigMap 30 metadata: 31 name: <config-map-name> 32 data: 33 service.pagerdutyv2: | 34 serviceKeys: 35 my-service: $pagerduty-key-my-service 36 ``` 37 38 ## Template 39 40 [Notification templates](../templates.md) support specifying subject for PagerDuty notifications: 41 42 ```yaml 43 apiVersion: v1 44 kind: ConfigMap 45 metadata: 46 name: <config-map-name> 47 data: 48 template.rollout-aborted: | 49 message: Rollout {{.rollout.metadata.name}} is aborted. 50 pagerdutyv2: 51 summary: "Rollout {{.rollout.metadata.name}} is aborted." 52 severity: "critical" 53 source: "{{.rollout.metadata.name}}" 54 ``` 55 56 The parameters for the PagerDuty configuration in the template generally match with the payload for the Events API v2 endpoint. All parameters are strings. 57 58 * `summary` - (required) A brief text summary of the event, used to generate the summaries/titles of any associated alerts. 59 * `severity` - (required) The perceived severity of the status the event is describing with respect to the affected system. Allowed values: `critical`, `warning`, `error`, `info` 60 * `source` - (required) The unique location of the affected system, preferably a hostname or FQDN. 61 * `component` - Component of the source machine that is responsible for the event. 62 * `group` - Logical grouping of components of a service. 63 * `class` - The class/type of the event. 64 * `url` - The URL that should be used for the link "View in ArgoCD" in PagerDuty. 65 66 The `timestamp` and `custom_details` parameters are not currently supported. 67 68 ## Annotation 69 70 Annotation sample for PagerDuty notifications: 71 72 ```yaml 73 apiVersion: argoproj.io/v1alpha1 74 kind: Rollout 75 metadata: 76 annotations: 77 notifications.argoproj.io/subscribe.on-rollout-aborted.pagerdutyv2: "<serviceID for PagerDuty>" 78 ```