AppDynamics Installation Instructions

How to Integrate AppDynamics with BigPanda

Create an App Key

First create an App Key. You'll need a separate App Key for each integrated system.

Select an Install Method

Webhook
Action Script

Webhook

Determine Your Version

AppDynamics Webhooks are available in AppDynamics version 4.1 and up.

For previous versions, please click on Action Script above.

Create the BigPanda HTTP Request Template

Note: Complete this step only one time per AppDynamics controller.

1. Log in to your AppDynamics controller.

2. Click Alert & Respond.

3. Click HTTP Request Templates.

4. Click New.

5. In the Name field, enter BigPandaAlertTemplate.

6. In the Request URL section:

7. In the Custom Request Headers section, add a header with the following values:
Authorization Bearer $TOKEN

8. In the Payload section:

  • In the MIME Type field, enter application/json.
  • In the text area, copy the following template:
           {
   "account_name":                  "${account.name}",
   "account_id":                    "${account.id}",
   "action_name":                   "${action.name}",
   "action_id":                     "${action.id}",
   "action_trigger_time":           "${action.triggerTime}",
   "controller_link_url":           "${controllerUrl}",
   "clamped":                       ${clamped},
   "clamp_limit":                   ${clampLimit},
   "from_web_hook":                 true,
 #if (${notes})
   "notes":                         "${notes}",
 #end
   "policy_name":                   "${policy.name}",
   "policy_id":                     "${policy.id}",
   "policy_digest":                 ${policy.digest},
   "full_events_list":              [
 #foreach(${event} in ${fullEventList})
   {
     "include_fields": ["event_type"],
 #if (${event.healthRuleEvent})
     "health_rule_event":           ${event.healthRuleEvent},
     "health_rule_violation_event": ${event.healthRuleViolationEvent},
     "health_rule_id":              ${event.healthRule.id},
     "health_rule_name":            "${event.healthRule.name}",
     "incident_id":                 "${event.incident.id}",
     "incident_name":               "${event.incident.name}",
     "appd_event_type":             "health-rule",
 #else
     "appd_event_type":             "error-event",
 #end
     "display_name":                "${event.displayName}",
     "app_id":                      ${event.application.id},
     "app_name":                    "${event.application.name}",
     "bt_performance_event":        ${event.btPerformanceEvent},
     "deep_link_url":               "${event.deepLink}",
     "event_type":                  "$event.eventType",
     "event_message":               "${event.eventMessage.replaceAll("\\<[^>]*\\>","")}",
     "event_type_key":              "${event.eventTypeKey}",
     "event_time":                  "${event.eventTime}",
     "guid":                        "${event.guid}",
 #if (${event.node_name})
     "node_name":                   "${event.node.name}",
     "node_id":                     "${event.node.id}",
 #end
     "summary_message":             "${event.summaryMessage.replaceAll("\\<[^>]*\\>","")}",
     "severity":                    "${event.severity}",
     "tag":                         "bigpanda-api",
 #if (${event.tier_name})
     "tier_name":                   "${event.tier.name}",
     "tier_id":                     "${event.tier.id}",
 #end
     "affected_entities":           [
 #foreach(${entity} in ${event.affectedEntities})
         {
           "id":                    ${entity.id},
           "name":                  "${entity.name}",
           "type":                  "${entity.entityType}"
         }#if ($velocityHasNext), #end
 #end
     ]
   }#if ($velocityHasNext), #end
 #end
   ]
 }
  • Update the include_fields array to capture any fields that you would like to include on the final BigPanda alert.
  • For more information on available AppDynamics variables, please refer to their documentation here.

9. In the Settings section, make sure that the One Request Per Event check box is not selected.

10. Click Save.

Create an AppDynamics Policy

Note: You'll need to repeat this step for each Application.

1. Go to Application > [Select Application] > Alert & Respond > Policies then click Create Policy Manually.

2. In the Create Policy window:

  • In the name field, enter BigPanda.
  • Select all check boxes for event types that you would like to receive BigPanda Alerts for.

Create an AppDynamics Action

1. In the Create Policy window, click Actions in the left pane, and then click the Plus icon.

2. If you already created a BigPandaAlert action for another application in AppDynamics, choose it and then click Select.

3. If you have not created a BigPandaAlert action for another application in AppDynamics, create the action:

  1. Click Create Action.

  2. Select Make an HTTP Request.

  3. Click OK.

  4. In the HTTP Request Template field, select BigPandaAlertTemplate.

  5. Click Save to save the action.

4. Click Save to create the new policy.

Success

The next time AppDynamics generates an event, you will see it in the Incidents Dashboard.

Action Script

Determine Your Version

BigPanda supports on-premise and dedicated SaaS deployments of AppDynamics. The procedure for configuring the custom action (steps 4 - 6) is different depending on which version you are using.

  • For a dedicated SaaS deployment, contact AppDynamics support to configure the custom action.
  • For an on-premise deployment with the Windows controller, contact [email protected]
  • For an on-premise deployment with the Linux controller, follow steps 4 - 6 and contact [email protected] if you have any questions.

Download the Extension

1. Download the tar.gz release and unpack it to <CONTROLLER INSTALL ROOT>/custom/actions.

2. If your controller is deployed on RHEL 5 or CentOS 5 install the simplejson module:

$ sudo yum install python-simplejson

Add the BigPanda Custom Action

Create <CONTROLLER INSTALL ROOT>/custom/actions/custom.xml with the following content. If the file already exists, just add the bigpanda-alert action.

<custom-actions>
    <action>
        <type>bigpanda-alert</type>
        <executable>bigpanda_alert.py</executable>
    </action>
</custom-actions>

Configure the Action

Edit <CONTROLLER INSTALL ROOT>/custom/actions/bigpanda-alert/config.ini and set your API token and app key:

[base]
api_token: $TOKEN
app_key: $YOUR_ID
logging: no

You can enable logging for debug purposes. The log will be available at /tmp/bigpanda-alert.log.

Log in to AppDynamics

1. Log in to the AppDynamics Controller.

2. For every application you have configured in AppDynamics, complete steps 8 - 9.

Create an AppDynamics Policy

1. Go to Application > Alert & Respond > Policies and click Create Policy.

2. In the Create Policy window:

  • In the name field, enter BigPanda.
  • Select all of the Health Rule Violation Events check boxes.

Your selections should look like the example found in the BigPanda Integration Console.

Create an AppDynamics Action

1. In the Create Policy window, click Actions in the left pane, and then click the Plus sign.

2. If you already created a BigPandaAlert action for another application in AppDynamics, choose it and then click Select.

3. If you have not created a BigPandaAlert action for another application in AppDynamics, create the action:

  1. Click Create Action.
  2. Select Run a Custom Action that has been uploaded to the Controller.
  3. Click OK.
  4. In the name field, enter BigPandaAlert.
  5. Click Reload Custom Actions.
  6. In the Custom Action field, select bigpanda-alert.
  7. Click Save to save the new custom action.

4. Click Save to create the new policy.

Set the AppDynamics Timezone (Optional)

The on-premise version of AppDynamics uses the timezone that has been set on the system that AppDynamics is installed on. Connect to the server AppDynamics is installed on, check its timezone, and select it in the BigPanda Integrations Console.

Success

Ensure you have completed steps 8 - 9 for every application in AppDynamics.

The next time AppDynamics generates a health rule alert, you will see it in the Incidents Dashboard.

Note: If you need support for alerts other than health rules using the Action Script, please contact [email protected]