# Dynatrace Integration

With the ilert Dynatrace integration, you can add alerts in ilert based on problems from Dynatrace.

## In ilert: Create a Dynatrace alert source <a href="#create-alert-source" id="create-alert-source"></a>

1. Go to **Alert sources** --> **Alert sources** and click on **Create new alert source**

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FjX0cS4q7woTXKajZmc1W%2FScreenshot%202023-08-28%20at%2010.21.10.png?alt=media&#x26;token=8ef3666b-84eb-4b51-abee-f07303313941" alt=""><figcaption></figcaption></figure>
2. Search for **Dynatrace** in the search field, click on the Dynatrace tile and click on **Next**.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FlXzQlJpaTFSR49AZk0xA%2FScreenshot%202023-08-28%20at%2010.24.23.png?alt=media&#x26;token=cffeacb4-57b9-47d4-827d-b0f6b1afd914" alt=""><figcaption></figcaption></figure>
3. Give your alert source a name, optionally assign teams and click **Next**.
4. Select an **escalation policy** by creating a new one or assigning an existing one.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FNnuZqONaIhbOf6fn4OkZ%2FScreenshot%202023-08-28%20at%2011.37.47.png?alt=media&#x26;token=8a74f7b5-5bd2-4eea-97fa-1c1dbb041333" alt=""><figcaption></figcaption></figure>
5. Select you [Alert grouping](https://docs.ilert.com/alerting/configure-alerting/alert-sources#alert-grouping) preference and click **Continue setup**. You may click **Do not group alerts** for now and change it later.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FueugN4JgHn1c90ggFA6u%2FScreenshot%202023-08-28%20at%2011.38.24.png?alt=media&#x26;token=b8009daf-3ca8-4264-a6fa-e42ef7333205" alt=""><figcaption></figcaption></figure>
6. The next page show additional settings such as customer alert templates or notification prioritiy. Click on **Finish setup** for now.
7. On the final page, an API key and / or webhook URL will be generated that you will need later in this guide.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FJ1QwcjLiVLOyieOrgmpC%2FScreenshot%202023-08-28%20at%2011.47.34.png?alt=media&#x26;token=72dc29a2-ded0-44cd-89bc-229bb0569626" alt=""><figcaption></figcaption></figure>

## In Dynatrace: Create a HTTP Request Template <a href="#in-dynatrace" id="in-dynatrace"></a>

1. Go to **Settings** --> **Integration** --> **Problem Notifications** and click on **Set up notifications** to add a new template

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_1sjI0UMbCSiTGgPH%2F-M9_4Kzz-8dAhq5dGdK-%2Fdyn1.png?alt=media\&token=95403cb6-ee9f-4c57-933b-e0888b931c25)

2. Select **Custom integration**

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_1sjI0UMbCSiTGgPH%2F-M9_4NulIAy3yLS04uju%2Fdyn2.png?alt=media\&token=980de5da-fd8d-425d-a049-ae7a45bd9908)

3. In the **Name** section, enter a name (e.g. "ilert Notification")
4. In the **Webhook URL** section, set the **Webhook URL** to the one generated in ilert
5. In the **Additional HTTP Headers** section, add the following headers `Accept`: `application/json` and `Content-Type`: `application/json`
6. In the *Custom payload* section, set the MIME type to `application/json` and copy and paste the following JSON payload:

```
{
 "State": "{State}",
 "ProblemID": "{ProblemID}",
 "ProblemTitle": "{ProblemTitle}",
 "ProblemURL": "{ProblemURL}",
 "ProblemDetailsText": "{ProblemDetailsText}"
}
```

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_1sjI0UMbCSiTGgPH%2F-M9_4VkWr-Rr35r2Q0N5%2Fdyn3.png?alt=media\&token=fbf46d9a-8140-4dba-879d-87f4d3c7904a)

7. Click the **Send test notification** button and you should receive a **Custom integration test successful** dialog message

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M76ygPnS4HUcFSX8ulm%2F-M9_1sjI0UMbCSiTGgPH%2F-M9_4Z-I8YzczxGawilD%2Fdyn4.png?alt=media\&token=af063da5-dd19-4994-bf30-a7190a1d2d6a)

8. Click **Save**

## FAQ <a href="#faq" id="faq"></a>

**Will alerts in ilert be resolved automatically?**

Yes, as soon as the recovery conditions of application, server or database are met, the alert in ilert will be resolved automatically.

**Can I setup Dynatrace with multiple alert sources from ilert?**

Yes, you can create arbitrary mappings between your applications in Dynatrace and alert sources in ilert. Simply create additional actions in Dynatrace using the same HTTP Request Template with a different `ilertApiKey`.

**Can I customize the alert messages?**

Yes, you can customize the events sent to ilert by changing the JSON payload in the **Payload** section of the **HTTP Request Template**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ilert.com/integrations/inbound-integrations/dynatrace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
