PagerDuty for Workflows
Your Dynatrace environment can integrate with a PagerDuty environment, enabling you to create incidents, based on your monitoring data automatically.
Configure the integration
To use PagerDuty workflow actions, you first need to install the PagerDuty for Workflows app from Dynatrace Hub.
- In Dynatrace Hub , select PagerDuty for Workflows.
- Select the PagerDuty for Workflows app and select Install.
Grant permissions to Workflows
Some permissions are required by Workflows to run actions on your behalf. Other permissions are required by actions that come bundled with PagerDuty for Workflows itself.
To fine-tune permissions granted to Workflows
- Open Workflows and go to Settings > Authorization settings.
- Make sure the following permissions are selected.
- Permissions needed for Workflows:
- Permissions needed for PagerDuty workflow actions:
- Permissions needed for Workflows:
Create PagerDuty API key
To interact with PagerDuty, you need an API key. To learn how to obtain it, refer to the PagerDuty official documentation.
Configure PagerDuty connection
You need a configured connection for each of your PagerDuty environments.
To configure a connection
- Open the Settings app and go to Dynatrace Apps > PagerDuty connections.
- Select Add item.
Provide a meaningful name for your connection.
If needed, adapt the URL of the PagerDuty API.
Provide your PagerDuty API key.
- Select Save changes.
The following workflow actions are available for the PagerDuty integration. Each action corresponds to an endpoint of the PagerDuty API.
|PagerDuty API endpoint
Create an incident
Creates an incident in your PagerDuty environment. An incident represents a problem or an issue that needs to be addressed and resolved.
Use other actions to obtain the necessary input.
List all of the on-calls
Lists all PagerDuty users who are on call duty.
List escalation policies
Lists PagerDuty escalation policies. An escalation policy defines who to notify (and how) in case of an incident.
Lists PagerDuty priorities. A priority defines the importance of an incident. The list is ordered from the most to the least severe.
Lists PagerDuty services. A service represents an application, component, or team to which you want to map the incident.
List all users of your PagerDuty environment.
Create a PagerDuty incident
To create an incident, you need to provide the information listed below. You can hard-code them in the Create an incident action or extract them from PagerDuty via an appropriate action.
|The ID of the user who creates the incident
|The incident title
|The ID of the service in your PagerDuty environment
|The urgency of the incident
|Additional incident details
|A description of the incident
|The ID of the incident assignee
|Escalation policy ID
|The ID of the escalation policy
|The phone number of the conference call for the conference bridge
|The URL for the conference bridge, such as a link to a web conference or Slack channel
|A unique identifier for this incident. For most use cases this is the Dynatrace event ID.
For more details on each parameter, refer to Create an incident in the PagerDuty official documentation.
To create a workflow that raises a PagerDuty incident
- Open Workflows and select to create a new workflow.
- In the Choose trigger panel, select the trigger best suited to your needs.
- On the trigger node, select to browse available actions.
- optional In the Choose action panel, search for
PagerDutyand select one of the information-extracting actions.
- optional If needed, add more information-extracting actions. Be sure to put them in parallel.
- On one of the information-extracting nodes, select , search for
PagerDuty, and select Create an incident.
- On each of the remaining information-extracting nodes, select and drag the line to the Create an incident action.
- In the Create an incident action, select the connection to your PagerDuty environment.
- Configure the input fields as needed. To learn how to use the output of information-extracting notes, see Expression reference.
- To test your workflow, select Run.
The following fields are required in the Create an incident action. Workflow execution fails if they're not provided.
- Service ID
Even with all mandatory fields provided, it's still possible for a workflow execution to fail. For example, a connection token could be expired or the result of an expression could result in input that's considered invalid.
To run workflows, Workflows needs to be allowed to read app settings on your behalf. Insufficient permissions can lead to an execution error.
To grant this permission, open Workflows , go to Settings > Authorization Settings, and select