# AppDynamics Integration

### Overview

AppDynamics provides deep application performance monitoring (APM) and infrastructure visibility.

To integrate AppDynamics with our platform, we use an HTTP Request Template. Instead of sending AppDynamics' default complex payload, we use Velocity Template Language (VTL) to extract only the necessary variables. This formats the outgoing webhook to perfectly match our Event ➔ Alert ➔ Incident workflow.

### Provider Configuration & Mapping

AppDynamics sends event severity as `ERROR`, `WARN`, or `INFO`. We map these specific text values to our platform's internal priorities.

Priority Mapping Config:

JSON

```
{
  "priority": {
    "field": "$.Severity",
    "options": [
      { "value": "ERROR", "label": "Error" },
      { "value": "WARN", "label": "Warning" },
      { "value": "INFO", "label": "Info" }
    ],
    "mapping": {
      "ERROR": "CRITICAL",
      "WARN": "MEDIUM",
      "INFO": "LOW"
    }
  }
}
```

Correlation (Fingerprint): We use `$.IncidentNumber`, which pulls from the AppDynamics `${latestEvent.id}`. This unique ID allows our platform to track the alert and automatically resolve it when AppDynamics sends a recovery signal.

### Setup Instructions

#### Step 1: Get Your Webhook URL

1. Log in to your alert management platform.
2. Go to Sources → Add Source.
3. Select AppDynamics as your provider.
4. Save the configuration and copy the generated Webhook URL.

#### Step 2: Create the HTTP Request Template

1. Log in to your AppDynamics Controller.
2. From the top navigation bar or left menu, click Alert & Respond.
3. Click HTTP Request Templates.
4. Click New to create a fresh template.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FmHx4s5HfrNgxeM5Li6ad%2Fimage.png?alt=media&#x26;token=5e076a00-2be7-40f5-a465-764be04231e7" alt=""><figcaption></figcaption></figure>

#### Step 3: Configure the Request Settings

Fill out the configuration form with your webhook details:

1. Name: Type a clear name (e.g., `OnCall Platform Webhook`).
2. Method: Select `POST`.
3. Raw URL: Paste the Webhook URL you copied in Step 1.
4. Authentication: Leave this as `NONE`.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FB7LBjTMSqMtJIhW6uaKP%2Fimage.png?alt=media&#x26;token=b425c080-8f09-4f2a-af61-ef4dec6e139d" alt=""><figcaption></figcaption></figure>

Under the Custom Request Headers section, click Add Header:

* Header Name: `Content-Type`
* Header Value: `application/json`

Under the Payload section:

1. MIME Type: Select `application/json`.
2. Paste the following VTL-formatted JSON into the text area:

JSON

```
{
  "incident_name": "${latestEvent.displayName} – ${latestEvent.node.name}",
  "severity":      "${latestEvent.severity}",
  "description":   "${latestEvent.summaryMessage}",
  "app_name":      "${latestEvent.application.name}",
  "node_name":     "${latestEvent.node.name}",
  "event_id":      "${latestEvent.id}",
  "event_guid":    "${latestEvent.guid}",
  "event_type":    "${latestEvent.eventType}",
  "monitor_url":   "${latestEvent.deepLink}",
  "policy_name":   "${policy.name}",
  "time":          "${latestEvent.eventTime}",
  "message":       "${latestEvent.eventMessage}"
}
```

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FFIm72BOCXt5eCtxYwZrX%2Fimage.png?alt=media&#x26;token=c4288fd0-1667-4cbb-b579-795eac407c77" alt=""><figcaption></figcaption></figure>

Under the Settings section:

1. Check the box for One Request Per Event. This ensures alerts are sent individually and not batched together.
2. Click Save.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FWSCvLKaImLZYqvZ3NbNM%2Fimage.png?alt=media&#x26;token=7c8a1cab-c9d5-4bfb-989c-a93e03958f50" alt=""><figcaption></figcaption></figure>

#### Step 4: Test the Template

1. Scroll to the bottom of your saved template and click Test.
2. Click Add Event Type and select an event like Health Rule Violation Started - Warning.
3. Click Run Test.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FxNscntDOJq6nGUSAJv5d%2Fimage.png?alt=media&#x26;token=03b1ead3-cc4a-4ab1-92ff-625d2f5f9b19" alt=""><figcaption></figcaption></figure>

4. A green SUCCESS status indicates the payload was successfully delivered to your platform.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FsM95DkCAF3lzJkowhnpn%2Fimage.png?alt=media&#x26;token=95619c7a-490b-4fe2-9c06-b7829a86eb3e" alt=""><figcaption></figcaption></figure>

#### Step 5: Create an Action

After testing the template, you must save it as an executable Action.

1. Go back to the Alert & Respond menu and click Actions on the left sidebar.
2. Click Create Action.
3. Select Make an HTTP Request and click OK.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FyzTcrB7atLDs9RDo1H4f%2Fimage.png?alt=media&#x26;token=359af34f-f2da-4189-b686-1277696301b6" alt=""><figcaption></figcaption></figure>

4. Name: Type a name for this action (e.g., `OnCall Platform Webhook`).
5. HTTP Request Template: Select the template you created in Step 3 from the dropdown menu. The URL and Payload will auto-populate.
6. Click Save.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2F4ia9OquQTpoWiLJWmapP%2Fimage.png?alt=media&#x26;token=79a6b030-5245-4c06-97cd-019f343aca23" alt=""><figcaption></figcaption></figure>

#### Step 6: Link the Action to a Policy

To automate the webhook, you need to attach this Action to a monitoring Policy. When the policy triggers an alert, it will execute the webhook.

1. In the Alert & Respond menu, click Policies.
2. Click Create Policy. *(If a setup wizard appears, click Create Policy Manually under Quick Links).*

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FEZYdcgNgtXMCVtkzxm5i%2Fimage.png?alt=media&#x26;token=50c3ef54-9fc0-4912-b77c-a4c54acf1fb7" alt=""><figcaption></figcaption></figure>

3. In the Trigger tab, define which events should trigger the alert. For example, check the boxes for Health Rule Violation Events (Warning, Critical, etc.).

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2F8ubIiFHgxKEdRgcUgHGE%2Fimage.png?alt=media&#x26;token=9339c51f-e115-41d7-bedc-05a7fecfb107" alt=""><figcaption></figcaption></figure>

You should choose;

* &#x20;Health Rule Violation Started - Critical
* &#x20;Health Rule Violation Started - Warning
* &#x20;Health Rule Violation **Ended** - Critical
* &#x20;Health Rule Violation **Ended** - Warning<br>

4. Go to the Actions tab at the top.
5. Click the + button to select an action. Choose your newly created `OnCall Platform Webhook` action and click Select.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FWfAP8u1cpqeayDamHQxg%2Fimage.png?alt=media&#x26;token=d90c12e9-11c5-40ff-a893-c8cacd842e31" alt=""><figcaption></figcaption></figure>

6. Click Save to activate the policy. You will now see your active policy properly linked to the webhook action.

<figure><img src="https://4108595529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FimJRSa33y5Ej6rwXrBeA%2Fuploads%2FHkm7ZbK5vffQ9RGHmqsk%2Fimage.png?alt=media&#x26;token=90370b57-0b8b-4349-bf2e-e1b9f6748fa0" alt=""><figcaption></figcaption></figure>

***

<a class="button secondary"></a>
