|
| 1 | +Dynatrace Integration with Robusta |
| 2 | +================================== |
| 3 | + |
| 4 | +.. note:: |
| 5 | + This feature is available with the Robusta SaaS platform and self-hosted commercial plans. It is not available in the open-source version. |
| 6 | + |
| 7 | +This guide explains how to forward **Dynatrace problem notifications** to Robusta via a webhook. |
| 8 | + |
| 9 | +Requirements |
| 10 | +------------ |
| 11 | + |
| 12 | +- Robusta is deployed and running. |
| 13 | +- You have access to the Robusta UI (to create an API key and find your ``account_id``). |
| 14 | +- You have admin access to the Dynatrace platform (to configure Problem notifications). |
| 15 | + |
| 16 | +Step 1: Get Robusta Account ID and API Key |
| 17 | +------------------------------------------ |
| 18 | + |
| 19 | +1. In the Robusta UI, go to **Settings → API Keys**. |
| 20 | +2. Click **New API Key**, select **Alerts: Write** permissions, and **Save**. |
| 21 | +3. Copy the generated API key — you will use it as a Bearer token in Dynatrace. |
| 22 | +4. Find your ``account_id``: |
| 23 | + - In Robusta, the ``account_id`` appears in your **generated_values.yaml** file (from installation), or |
| 24 | + - In the Robusta UI under **Settings → Workspace**. |
| 25 | + |
| 26 | +Step 2: Create a Dynatrace Problems Webhook |
| 27 | +------------------------------------------- |
| 28 | + |
| 29 | +1. In Dynatrace, open the **command palette** (**Cmd+K** on macOS / **Ctrl+K** on Windows/Linux). |
| 30 | +2. Search for **problem notification** and open **Problem notifications**. |
| 31 | +3. Click **Add notification** and choose **Webhook**. |
| 32 | +4. Configure the **URL**: |
| 33 | + |
| 34 | + ``https://api.robusta.dev/integrations/generic/dynatrace`` |
| 35 | + |
| 36 | +5. Set the **Custom payload** to the Dynatrace macro: |
| 37 | + |
| 38 | + .. code-block:: json |
| 39 | +
|
| 40 | + {ProblemDetailsJSONv2} |
| 41 | +
|
| 42 | +6. Add the following **HTTP headers**: |
| 43 | + |
| 44 | + .. code-block:: http |
| 45 | +
|
| 46 | + Authorization: Bearer <api-key> |
| 47 | + account-id: <account_id> |
| 48 | +
|
| 49 | + Replace ``<api-key>`` with the Robusta API key from Step 1 and ``<account_id>`` with your Robusta account ID. |
| 50 | + |
| 51 | +7. Save the webhook notification. |
| 52 | + |
| 53 | +Validation |
| 54 | +---------- |
| 55 | + |
| 56 | +- In Dynatrace, use **Send test notification** (if available) on the webhook to verify connectivity. |
| 57 | +- Alternatively, trigger a test problem that matches your environment. |
| 58 | +- In Robusta’s UI, confirm the alert appears with the expected title, description, and problem details. |
| 59 | + |
| 60 | +What the Payload Contains |
| 61 | +------------------------- |
| 62 | + |
| 63 | +- ``{ProblemDetailsJSONv2}`` expands to Dynatrace’s full problem JSON (v2), including problem ID, status/open/closed times, impacted entities, evidence, and root cause information. |
| 64 | +- Robusta stores the original Dynatrace payload for troubleshooting and enrichment. |
| 65 | + |
| 66 | +Troubleshooting |
| 67 | +--------------- |
| 68 | + |
| 69 | +- **401/403 Unauthorized**: Ensure the **Authorization** header uses a valid Robusta API key with **Alerts: Write** permissions. |
| 70 | +- **Missing or incorrect account**: Confirm the **account-id** header exactly matches your Robusta ``account_id`` from **generated_values.yaml** (or **Settings → Workspace**). |
| 71 | +- **Not receiving alerts**: Verify the Dynatrace webhook is **enabled**, the URL is exactly |
| 72 | + ``https://api.robusta.dev/integrations/generic/dynatrace``, and that problems are actually being generated in your environment. |
| 73 | +- **Firewall/egress**: Ensure the Dynatrace environment can reach ``api.robusta.dev`` over HTTPS (TCP 443). |
| 74 | + |
| 75 | +Change Management |
| 76 | +----------------- |
| 77 | + |
| 78 | +- If you rotate the Robusta API key, update the **Authorization** header in Dynatrace accordingly. |
| 79 | +- If you migrate workspaces or tenants and your ``account_id`` changes, update the **account-id** header. |
0 commit comments