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
, search for 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:
app-engine:functions:run
- Permissions needed for PagerDuty workflow actions:
app-settings:objects:read
state:app-states:read
state:app-states:write
state:app-states:delete
- 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.
Available actions
The following workflow actions are available for the PagerDuty integration. Each action corresponds to an endpoint of the PagerDuty API.
Action | Description | 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. | |
List priorities | Lists PagerDuty priorities. A priority defines the importance of an incident. The list is ordered from the most to the least severe. | |
List services | Lists PagerDuty services. A service represents an application, component, or team to which you want to map the incident. | |
List users | 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.
Field | Description | Required |
---|---|---|
From | The ID of the user who creates the incident | required |
Title | The incident title | required |
Service ID | The ID of the service in your PagerDuty environment | required |
Urgency | The urgency of the incident | optional |
Additional incident details | A description of the incident | optional |
Assignee ID | The ID of the incident assignee | optional |
Escalation policy ID | The ID of the escalation policy | optional |
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
PagerDuty
and 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.
Troubleshooting
The following fields are required in the Create an incident action. Workflow execution fails if they're not provided.
- From
- Title
- 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
app-settings:objects:read
.