Dynatrace
Dynatrace is a leading performance and application monitoring application. This integration incorporates Dynatrace Problem alerts into your xMatters toolchain, letting you to send alerts using xMatters and update the Dynatrace Problem with alert status, device delivery, and response information from xMatters notifications.
How it works
When a problem meets a specified threshold in Dynatrace, it sends a JSON-formatted webhook to xMatters. A Dynatrace trigger in xMatters parses the webhook and initiates a flow. The webhook includes essential alert data you can use to enrich notifications to users or when building automated tasks.
Install the workflow
The following instructions describe how to install the workflow through the xMatters one-click installation process. If you already installed the previous, built-in version of the integration, you can find instructions here.
- Go to the Workflow Templates page and click the Dynatrace tile.
- On the Set up the Workflow tab, give the workflow a name that identifies its purpose (this must be unique in your instance), add an optional description, and set the default incident type (if applicable). Any built-in Initiate Incident steps in the workflow will automatically be set to the selected incident type.
- You can edit these later, if needed.
- Click Next to set up the connection.
- Copy the trigger URL — you’ll use this to configure the webhooks in Dynatrace.
- The trigger URL includes the recipients parameter, which specifies who should be notified. By default, this parameter is set to notify you (the logged in user), but you can set it to target any user or group you want.
- Send a test signal to the trigger URL to test the connection.
- Click Open Workflow to view and customize the workflow, or Close to return to the Workflows page.
Configure Dynatrace to send requests to the trigger URL
To have Dynatrace send alerts to the flow trigger, you need to configure a webhook and set it to use the trigger URL.
- In Dynatrace go to the Settings menu.
- Expand the Integration menu and click Problem notifications.
- Click Add notification and select xMatters from the list of notification types.
- Fill in the following fields:
- Notification type: xMatters.
- Display name: The name of the notification configuration.
- xMatters URL: Paste the trigger URL you copied from the Dynatrace trigger in Flow Designer. Add the target names of any recipients you want to notify when the alert fires to the end of the URL.
- For URL authentication, use an ampersand to attach recipients. For example, if you want to notify Emma Pearson and the on-call members in the group responsible for the Antares service, you'd add &recipients=epearson,antares to the end of the URL.
- For other authentication types, use a question mark to attach recipients. For example, if you want to notify Barry Gull and the on-call members in the group responsible for the Cassiopeia service, you'd add ?recipients=bgull,cassiopeia to the end of the URL.
- You must URL-encode any special characters or spaces in the target names.
- Leave the toggle for Accept any SSL certificate unselected.
- Leave the Custom JSON payload section unchanged.
- Under Additional HTTP headers, click Add item.
- Set the name of the new header to Authorization, and the value to Basic<Base64_encoded_value>.
- Select an Alerting profile from the drop-down list.
- Click Send test notification.
- When the test completes successfully, Save changes to the notification.
If you want to use Basic Authentication, you must Base64 encode the username and password of an xMatters user with permission to access the workflow. You can create a Base64 encoded username and password at https://www.base64encode.org/ or by typing echo “username:password” | base64 into a terminal.
You're ready to use the webhook to trigger automated flows, including steps such as sending alerts and initiating incidents, though we always recommend testing before putting things into use.
Set recipients in the trigger URL
The trigger expects the recipients in the trigger URL. When you copy the URL from xMatters, it includes the recipients parameter: &recipients=<yourname>. Of course, you don’t want to receive all the alerts.
To change the recipients for alerts from this webhook, swap out your name for the people or groups you want to target. For example, to target the DatabaseTeam, Antares Service Team, and HR & Marketing groups, add &recipients=databaseteam,antares%20service%20team,HR%20%26%20Marketing to the trigger URL. Remember to URL-encode any special characters, including spaces, in your group names.
We recommend using groups so you can take advantage of the xMatters group features — rotations, escalations, and absences — to reach the right on-call people to jump on an issue.
How to use the workflow
When a condition you've set fires, it sends a signal to xMatters, which creates an alert and notifies the individual or the on-call members of the people or groups you set as recipients in the webhook URL. When the trigger receives a signal saying the issue is resolved, it automatically terminates related alerts in xMatters.
The person responding to the notification has the following response options:
- Acknowledge: Acknowledges the notifications and stops escalations.
- Escalate: Immediately escalates the alert to the next on-call resolver in a targeted group.
- Close: Ends the xMatters alert and stops notifying all targeted recipients.
- Initiate Incident: Initiates an incident in xMatters.
Next Steps
Now that you've installed the workflow, you can use it as-is, or customize it to suit your needs better. Here are some examples of things you can add to the workflow to customize it:
- Use Slack, Zoom, and Microsoft Teams steps to add collaboration channels to the flow.
- Change the severity of incidents created when a recipient selects the Initiate Incident response.
- Update the message sent to resolvers to include the information most relevant to your team.
- Use the Dynatrace Problems trigger to build your own custom flows.
Previous versions
While the previous, built-in version of this integration is no longer available, the instructions for it are included below for anyone who has it installed in their system already and requires them as a reference.
Get started with Dynatrace
To install this integration in xMatters, simply go to Workflow Templates on the Workflows tab and start typing the name of the integration you're looking for to filter the list. Once you find it, click its tile then click Next to get to the configuration screen.
How to set up this workflow
- Give your workflow a name and description to help identify it in the list of workflows.
- Type a name to use when sending alerts so people receiving notifications can easily tell where its coming from.
- Enter the URL of your Dynatrace instance and the API token you want to use to authenticate requests to Dynatrace.
- Select the priority for alerts initiated by this workflow.
- Set whether you want to disable all updates to the Dynatrace Problem. If unselected, responses to notifications and comments are always written to the Problem record. You can also select to update the record when the integration creates an alert and when a notification is delivered.
- Add all of the users and groups you want notified, and then click Save.
To set up the integration, you need your Dynatrace API token to authenticate the xMatters requests.
- In Dynatrace, go to Settings.
- In the Settings menu, expand Integration and click Dynatrace API, then click Generate token.
- Give the token a name (for example, xMatters-Integration), and then click Generate.
- Click Copy beside the generated token.
Next, enter the Dynatrace endpoint. This is the sub-domain and domain of your Dynatrace instance (for example, acmeco.live.dynatrace.com).
Set whether you want comments added to the Problem Comment in Dynatrace when the integration is triggered or when a notification is delivered to a user's device (comments are always added for a recipient's response and for any comments they added when responding). Here's an example of the comments that are added if the boxes are selected:
Set the priority you want to assign to alerts generated by this configuration. You can create multiple configurations if you want to assign different priorities (for example, if you create another webhook for a specific Dynatrace alerting profile).
After you save the configuration, xMatters displays the URL you need to configure Dynatrace. It also displays the custom payload, which should be automatically populated when you set up an xMatters integration in Dynatrace.
- In Dynatrace, go to Settings.
- In the Settings menu, expand Integration and click Problem notifications, then click Set up notifications.
- Select xMatters to bring up the Set up xMatters integration page.
- Give the integration a name (for example, xMatters Integration).
- Paste the URL you copied from xMatters into the xMatters URL field, and check that the custom payload appears in the Custom JSON payload box (it should be populated automatically).
- Click Send test notification to test the configuration then click Save.
Your integration is now complete!
Use your integration
Dynatrace monitors all detected hosts in your environment. When it detects a problem, the integration sends a notification via xMatters, letting your team know what's happening so they can take action. You can trigger a test alert in your system to see the integration in action (for example, triggering a CPU saturation notification).
- Wait for Dynatrace to detect a problem or use a tool in your environment to simulate a problem state (for example, 100% CPU usage). After Dynatrace recognizes the problem, it triggers the integration and xMatters sends out the notification.
- When you receive the notification from xMatters, select a response (and add a comment if you'd like to see how that appears in Dynatrace). If you're responding using the xMatters mobile app, tap the URL to be taken to the Problem in Dynatrace.
Extending your integration
Looking to do more with xMatters and Dynatrace? If you want to tailor the settings and notifications for the integration, you can convert it to a custom workflow.