> ## Documentation Index
> Fetch the complete documentation index at: https://docs.easyalert.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynatrace

> Receive problem notifications from Dynatrace

## Overview

Easyalert automatically detects and processes Problem Notification webhooks from Dynatrace.

***

## Requirements

* **Dynatrace** account (SaaS or Managed)
* **Easyalert account** and active tenant
* Access to **Settings > Integration > Problem notifications** in Dynatrace

***

## Setup Instructions

<Steps>
  <Step title="Create Integration in Easyalert">
    1. Go to **Integrations** page from left menu
    2. Click **Add Integration** button
    3. Select **Dynatrace** as **Source Type**
    4. Enter a name (e.g., `Dynatrace Production`)
    5. Click **Create** to save
    6. Copy the generated **Webhook URL**

    > **Example:** `https://api.easyalert.io/api/v1/webhooks/ingest/wh_abc123...`
  </Step>

  <Step title="Create Webhook in Dynatrace">
    Go to **Settings → Integration → Problem notifications → Add notification**

    | Field                 | Value                |
    | --------------------- | -------------------- |
    | **Display name**      | `Easyalert`          |
    | **Webhook URL**       | Your Webhook URL     |
    | **Notification type** | `Custom integration` |
  </Step>

  <Step title="Configure Payload Template">
    Use this recommended payload:

    ```json theme={null}
    {
      "PID": "{PID}",
      "ProblemID": "{ProblemID}",
      "State": "{State}",
      "ProblemImpact": "{ProblemImpact}",
      "ProblemSeverity": "{ProblemSeverity}",
      "ProblemTitle": "{ProblemTitle}",
      "ProblemURL": "{ProblemURL}",
      "ProblemDetailsText": "{ProblemDetailsText}",
      "ImpactedEntities": {ImpactedEntities},
      "ImpactedEntityNames": "{ImpactedEntityNames}",
      "Tags": "{Tags}",
      "ProblemStartTime": {ProblemStartTime},
      "ProblemEndTime": {ProblemEndTime},
      "customer": "YOUR_CUSTOMER_NAME",
      "team": "YOUR_TEAM_NAME",
      "environment": "production"
    }
    ```

    <Warning>
      **IMPORTANT:** `{ImpactedEntities}`, `{ProblemStartTime}`, `{ProblemEndTime}` must NOT be in quotes!
    </Warning>
  </Step>

  <Step title="Test the Integration">
    Use the **Send test notification** button in Dynatrace
  </Step>
</Steps>

***

## Placeholder Variables

| Placeholder             | Description                                        |
| ----------------------- | -------------------------------------------------- |
| `{PID}`                 | Problem ID (short form)                            |
| `{ProblemID}`           | Full problem identifier                            |
| `{ProblemTitle}`        | Problem title                                      |
| `{ProblemDetailsText}`  | Detailed description                               |
| `{ProblemSeverity}`     | Severity level                                     |
| `{ProblemImpact}`       | Impact type (INFRASTRUCTURE, SERVICE, APPLICATION) |
| `{State}`               | OPEN, RESOLVED, or MERGED                          |
| `{ProblemURL}`          | Link to problem in Dynatrace                       |
| `{ImpactedEntities}`    | JSON array of affected entities                    |
| `{ImpactedEntityNames}` | Entity names (comma-separated)                     |
| `{RootCauseEntity}`     | Root cause entity                                  |
| `{ProblemStartTime}`    | Start time (epoch ms)                              |
| `{ProblemEndTime}`      | End time (epoch ms, -1 if open)                    |
| `{Tags}`                | Problem tags                                       |

***

## Field Mapping

| Dynatrace Field       | Easyalert Field |
| --------------------- | --------------- |
| `PID` / `ProblemID`   | Event ID        |
| `ProblemTitle`        | Title           |
| `ProblemDetailsText`  | Description     |
| `State`               | Status          |
| `ProblemSeverity`     | Severity        |
| `ProblemImpact`       | Impact tag      |
| `ImpactedEntityNames` | Host/Service    |
| `ProblemURL`          | URL             |

***

## State and Severity Mapping

### Status Mapping

| Dynatrace State | Easyalert Status |
| --------------- | ---------------- |
| `OPEN`          | Problem          |
| `RESOLVED`      | OK               |
| `MERGED`        | Problem (linked) |

### Severity Mapping

| Dynatrace Severity    | Easyalert Severity |
| --------------------- | ------------------ |
| `AVAILABILITY`        | Critical           |
| `ERROR`               | Critical           |
| `PERFORMANCE`         | High               |
| `RESOURCE_CONTENTION` | Warning            |
| `CUSTOM_ALERT`        | Warning            |

***

## Custom Field → Tag Conversion

**All custom fields** and tags from `{Tags}` placeholder are automatically captured as tags.

### Dynatrace Tags

`{Tags}` placeholder brings entity tags:

```
env:production,team:backend,customer:acme
```

In Easyalert:

```
tags.env = "production"
tags.team = "backend"
tags.customer = "acme"
```

### Custom Field Example

Added to template:

```json theme={null}
{
  ...
  "datacenter": "EU-West",
  "project": "ecommerce"
}
```

In Easyalert:

```
tags.datacenter = "EU-West"
tags.project = "ecommerce"
```

***

## Routing Examples

**Escalation Routing:**

```
tags.customer equals "AcmeCorp" → Acme Corp Policy
tags.env equals "production" → Production Policy
tags.team equals "backend" → Backend Team Policy
```

**Notification Rules:**

```
tags.ProblemSeverity equals "AVAILABILITY" → call + sms + email
tags.ProblemImpact equals "SERVICE" → Service Team channel
```

***

## Impact Types

Dynatrace categorizes problem impact:

| Impact           | Description                       |
| ---------------- | --------------------------------- |
| `INFRASTRUCTURE` | Affects infrastructure components |
| `SERVICE`        | Affects monitored services        |
| `APPLICATION`    | Affects applications              |
| `ENVIRONMENT`    | Affects entire environment        |

Impact is captured as a tag for routing.

***

## Test

```bash theme={null}
curl -X POST "YOUR_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "PID": "P-123",
    "ProblemID": "P-123",
    "State": "OPEN",
    "ProblemSeverity": "ERROR",
    "ProblemTitle": "High failure rate",
    "ProblemURL": "https://abc.dynatrace.com/#problems",
    "ImpactedEntities": [{"type": "SERVICE", "name": "api-service"}],
    "Tags": "env:production,team:backend",
    "ProblemStartTime": 1733234400000,
    "customer": "TestCustomer"
  }'
```

### Recovery Test

```bash theme={null}
curl -X POST "YOUR_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "PID": "P-123",
    "ProblemID": "P-123",
    "State": "RESOLVED",
    "ProblemEndTime": 1733238000000
  }'
```

***

## Alerting Profile Integration

Configure which problems trigger notifications:

1. Go to **Settings → Alerting → Alerting profiles**
2. Create or edit a profile
3. Define severity and scope rules
4. Link to your webhook notification

This allows fine-grained control over which problems reach Easyalert.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Notifications not being received">
    1. Verify webhook URL in Dynatrace settings 2. Test with "Send test
       notification" button 3. Check Dynatrace notification logs 4. Verify SSL/TLS
       settings if using HTTPS 5. Is notification enabled?
  </Accordion>

  <Accordion title="Custom fields not becoming tags">
    1. Verify field is added to template 2. Check field name spelling 3. View
       webhook samples in Easyalert
  </Accordion>

  <Accordion title="Invalid JSON error">
    1. Ensure `{ImpactedEntities}` is NOT in quotes 2. Ensure `     {ProblemStartTime}` is NOT in quotes 3. Ensure `{ProblemEndTime}` is NOT in
       quotes 4. Validate JSON syntax
  </Accordion>

  <Accordion title="Resolved problems not closing incidents">
    1. Ensure `State` field is in payload 2. Check that RESOLVED state is being
       sent 3. Verify `PID` matches between OPEN and RESOLVED
  </Accordion>

  <Accordion title="Missing entity information">
    1. Include `{ImpactedEntityNames}` in payload 2. Check that problem has
       entity association 3. Use `{ImpactedEntities}` for detailed JSON
  </Accordion>
</AccordionGroup>

***

## Best Practices

<AccordionGroup>
  <Accordion title="Use Alerting Profiles">
    Filter which problems send notifications to avoid noise from low-priority
    issues.
  </Accordion>

  <Accordion title="Include Problem URL">
    Always include `{ProblemURL}` so responders can quickly access Dynatrace for
    details.
  </Accordion>

  <Accordion title="Tag Your Entities">
    Use Dynatrace tags (environment, team, service) for better routing in
    Easyalert.
  </Accordion>

  <Accordion title="Add Custom Fields for Routing">
    Include `customer`, `team`, `environment` in payload for escalation routing.
  </Accordion>

  <Accordion title="Configure Problem Detection">
    Tune Dynatrace's automatic problem detection to reduce false positives
    before they reach Easyalert.
  </Accordion>
</AccordionGroup>
