AppDynamics Integration Guide

AppDynamics Integration

AppDynamics provides application and database performance management, monitoring, and analytic tools to help you identify and resolve performance issues, drive business outcomes, increase user engagement, and deliver amazing web user experiences.

How AppDynamics users benefit from PagerTree

AppDynamics triggers user defined events by monitoring applications. PagerTree acts as the dispatcher for these events, determining the right people to notify based on on-call schedules. PagerTree notifies them via email, sms, voice, and/or push notifications until the incident is acknowledged or closed.

Functionality of Integration

The AppDynamics integration is one-way, meaning:

  • When a monitor event is triggered (event_type == "trigger") in AppDynamics, an incident is created in PagerTree automatically.
  • When a monitor event is resolved (event_type == "resolve") in AppDynamics, the incident is resolved in PagerTree automatically.

Tutorial Overview

In this integration tutorial we will show you how to send alerts from AppDynamics into PagerTree. The estimated time for this integration is 30 minutes. We assume that you already have a PagerTree and AppDynamics account setup.

In PagerTree

  1. Click the team you wish to add the integration to. Select Team
  2. On the team page, click the “Integrations” tab. Click Integrations Tab
  3. On the “Integrations” tab, click the “+ Integration” button. Click Plus Integration Button
  4. In the “Create Integration” box, fill out the following:
    1. Name of the Integration,
    2. Select the Integration Type to AppDynamics
    3. Select an appropriate urgency for when this integration is triggered
    4. Select the team member the incident will be created by (example: manager or team lead)
    5. Select the team this incident will be assigned to Click Create
  5. Click “Create”
  6. Copy the WebHook URL Copy Webhook URL

In AppDynamics

  1. Go to the Alert & Respond tab, then HTTP Request Templates, then click “+ New” Click Alert and Respond Tab
  2. In the “Create HTTP Request Template” box
    1. First Section
      1. Name the template appropriately (ex: “PagerTree Integration Template”)
    2. Custom Templating Variables
      1. Add 1 custom templating variable
        1. pt_event_type with value trigger Add Customer Template Variable
    3. Request URL Section
      1. Select Method as POST
      2. Paste the PagerTree WebHook URL you copied for Raw URL
      3. Select URL Encoding as UTF-8 Request URL Settings
    4. Authentication Section
      1. Select Type as NONE
    5. Payload Section
      1. Select MIME Type as application/json
      2. Select Payload Encoding as UTF-8
      3. In the text area below Payload encoding, paste the below code
        {    
           "incident_key": "${latestEvent.node.name} - ${latestEvent.application.name}",
           "event_type": "${pt_event_type}",
           "description": "${latestEvent.displayName} on ${latestEvent.node.name}",
           "client": "AppDynamics",
           "client_url": "${controllerUrl}",
           "details": {
         "event_name": "${latestEvent.displayName}",
         "summary": "${latestEvent.summaryMessage}",
         "event_id": ${latestEvent.id},
         "guid": "${latestEvent.guid}",
         "event_time": "${latestEvent.eventTime}",
         "event_type": "${latestEvent.eventType}",
         "event_type_key": "${latestEvent.eventTypeKey}",
         "application_name": "${latestEvent.application.name}",
         "node_name": "${latestEvent.node.name}",
         "message": "${latestEvent.eventMessage}",
         "severity": "${latestEvent.severity}"
           },
           "contexts":[
         {
           "type": "image",
           "src": "${latestEvent.severityImage.deepLink}",
           "alt": "${latestEvent.severity}"
         },
         {
           "type": "link",
           "href": "${latestEvent.deepLink}",
           "text": "View this transaction in AppDynamics"
         }
           ]
        }
        
    6. Response Handling Criteria Section
      1. Under Success Criteria, click Add Success Criteria.
        1. Select 200 from the Status Code list
        2. Check Expect Payload checkbox
        3. Select application/json from the Content/Type list Success Criteria
    7. Settings Section
      1. Check “One Request Per Event” Check One Request per Event
      2. Once your template is saved you can test it to make sure an incident is created in PagerTree. Click the Test button, then click Add Event Type and select an event you want to test (our example uses “Health Rule Violation Started – Warning”, but you can pick any event type), then click Run Test. If you executed all steps correctly, PagerTree should have created an incident and notified the team member on-call. If you see that PagerTree did not create an incident, scroll to the very bottom of the Test Transcript and check the Response Payload for any errors.
      3. Click Actions on the left menu, select an application or database to create actions for, then click “+ CreateCreate Action
      4. Select Make an HTTP Request from the list and click OK. Make HTTP Request
      5. Give the action a Name (ex: “PagerTree Trigger”) and then select the template you just created from the list, then click Save. Name Action
      6. Create another action that will be used for resolving incidents. Give the action a Name (ex: “PagerTree Resolve”) and select the template you just created again. When the form populates, change the pt_event_type for this new action to resolve, then click Save. Create Resolve Action
      7. Lastly, we need to add these new actions to your desired policies. Click Policies on the left menu, and either edit or create a new policy. Create Policy
      8. At the top of the Create Policy dialog box Name the policy (ex: “Critical or Warn”).
      9. On the Trigger Tab, check the conditions with “Health Rule Violation Started” in the name. Create Policy Trigger Settings
      10. On the Actions Tab, click the “+” button to add an action to execute. Name the policy (ex: “Critical or Warn”). Click the Trigger Action you recently created, and then click Select. In the Create Policy Dialog click Save. Name Policy
      11. Create another policy that triggers when any conditions with “Health Rule Violation Ended” in the name. Assign the Resolve Action to this policy. Create Policy Ended

You have successfully completed the AppDynamics Integration. Now when AppDynamics creates an alert, PagerTree will create an incident and route it to the correct team member that is on-call. If you have any questions please contact support@pagertree.com