# AppDynamics

EvoHub receives AppDynamics health rule violations through an **HTTP Request Template** used by a policy action. A violation that starts opens an EvoHub alert; one that ends or is canceled resolves it.

## Set it up

:::steps
### Create the integration
In EvoHub, go to **On-Call → Integrations → + Add Integration**, choose **AppDynamics**, pick an **Escalation Policy** and click **Create Integration**. Copy the **Webhook URL**.
### Create the template
In AppDynamics, go to **Alert & Respond → HTTP Request Templates → New**. Set the method to `POST`, the **Raw URL** to your webhook URL, the payload MIME type to `application/json`, and paste the payload below. Use the template's **Test** button to check the variables resolve.
### Create the action and policy
Create an **HTTP Request** action that uses the template. In **Policies**, trigger it on health rule violations started, continuing, upgraded, downgraded, ended and canceled.
:::

```json
{"policy":"${policy.name}","event_type":"${latestEvent.eventTypeKey}","summary":"${latestEvent.summaryMessage}","display_name":"${latestEvent.displayName}","severity":"${latestEvent.severity}","app":"${latestEvent.application.name}","tier":"${latestEvent.tier.name}","node":"${latestEvent.node.name}","link":"${latestEvent.deepLink}"}
```

## What EvoHub reads

| EvoHub alert | Taken from |
| --- | --- |
| Title | `policy` and `app`, for example *Checkout health — shop-prod*. |
| Description | `summary` with its HTML removed. |
| Labels | `event_type`, `app`, `tier`, `node`, `policy`, and `url` (the deep link). |

### Severity

| Event type | EvoHub severity |
| --- | --- |
| `POLICY_OPEN_CRITICAL`, `POLICY_CONTINUES_CRITICAL`, `POLICY_UPGRADED` | critical |
| `POLICY_OPEN_WARNING`, `POLICY_CONTINUES_WARNING`, `POLICY_DOWNGRADED` | medium |
| `POLICY_CLOSE_*`, `POLICY_CANCELED_*` | resolves the alert |
| Other events | `severity`: ERROR high, WARN medium, INFO info |

## Resolve and deduplication

An alert is identified by the policy, the application and the node (or the tier when there is no node). Continuing, upgraded and downgraded violations update the open alert; a closed or canceled violation resolves it.

## Related

- [Integrations overview](https://docs-dev.evohub.io/integrations-overview.md)
- [Honeycomb](https://docs-dev.evohub.io/honeycomb.md)
