AppDynamics is an application performance management (APM) and IT Operations Analytics (ITOA) tool. Integration allows OpsRamp to accept alerts from AppDynamics. After successful integration, you can view AppDynamics alerts in OpsRamp. Integration is performed using webhook authentication.

Verified on AppDynamics version: 4.5.16

OpsRamp configuration

  1. From All Clients, select a client.
  2. Navigate to Setup > Account.
  3. Select the Integrations and Apps tab.
  4. The Installed Integrations page, where all the installed applications are displayed. Note: If there are no installed applications, it will navigate to the Available Integrations and Apps page.
  5. Click + ADD on the Installed Integrations page. The Available Integrations and Apps page displays all the available applications along with the newly created application with the version.
  6. Search for the application using the search option available. Alternatively, use the All Categories option to search.
  7. Click ADD on the AppDynamics tile.

Inbound (Optional):

AppDynamics - Inbound configuration

To configure the inbound, follow these steps:
Authentication:

  1. Select the Authentication Type as either Webhook or OAuth2.

    • Webhook: By default, Webhook is selected as the Authentication Type.
      Make a note of Tenant ID, Token and Webhook URL.
      These details are used while creating an HTTP Request template during AppDynamics configuration.

    • OAuth2: Select OAuth2 from the dropdown and click on Generate Key to generate the Key and Secret.
      Note: Keep a copy of the token as the information will not appear again. Read information about the Access Key.

  2. Map Attributes: Map OpsRamp entity attributes with AppDynamics attributes.

    1. Click +Add from the Map Attributes section.

    2. From the Add Map Attributes window, enter the below information:

      • OpsRamp Entity: Select Alert from the dropdown.
      • OpsRamp Property: Select the OpsRamp property from the dropdown.
      • AppDynamics Entity: Enter the AppDynamics entity value in the box and click the +value from the dropdown to add it. You can add multiple values.
      • AppDynamics Property: Enter the AppDynamics property.

      Parsing Condition:

      1. Click +Add and provide the parsing condition:
      2. Select an operator from the dropdown and enter a value in the fields accordingly. Based on the operator selected, the fields vary.
      3. Click Save. Click +Add to add more conditions.

      Property Values:

      1. Click +Property Value.
      2. Enter a value in the AppDynamics Property Value box and select the appropriate value from the OpsRamp Property Value dropdown.
        The options in the OpsRamp Property Value dropdown appear based on the OpsRamp Property selected.
      3. Click Save.
      • Click +Property Value to add more property values.

      Default Value: Alternatively, you can enter/select a default value in the box.

      Note: To map more attributes, click +Entity.

    3. Click Add Map Attributes. The mapped attributes list is added.

      • Click the three dots icon at the end of each row to edit or remove the map attributes.
      • Use the Filter option to filter the map attributes.

  3. Additional Settings: Select the Drop alerts from unmanaged resources checkbox if you do not want to trigger alerts from unmanaged resources.

  4. Enrich and Create Alert: Select a process definition from the dropdown. You can customize the incoming alerts according to the properties defined in the process definition.

  5. Click Finish.

The following table shows the sample property mappings.

Third-Party EntityOpsRamp EntityThird-Party PropertyOpsRamp Property (non-editable)
ProblemAlertcurrentState
Third-Party Property ValueOpsRamp Property Value
OKok
WarningWarning
CriticalCritical
alert.currentState
AlertALERTserviceNamealert.serviceName
AlertALERTdescriptionalert.description
AlertALERTdevice.hostNamealert.deviceName
AlertALERTalertTimealert.alertTime
AlertALERTsubjectalert.subject

Mappings can be modified later.

AppDynamics configuration for Webhook-based authentication

Step 1: Create HTTP request template

An HTTP request action sends an HTTP request in response to an event. These type of actions allows you to integrate AppDynamics policies with third-party HTTP APIs. When you create an HTTP request action using an HTTP request template, the template describes the HTTP request that is applicable when the policy initiates the action. These templates are reusable by different HTTP request actions in an AppDynamics account.

The following HTTP request templates must be created to send Critical, Warning, and Recovery alerts to OpsRamp. Only the Name and Payload are different for these templates.

To create individual HTTP request templates for Critical, Warning, and Recovery alerts:

  1. Log into AppDynamics.
  2. Click Alert & Respond and click HTTP Request Templates on the left pane.
  3. Click New to create an HTTP request template and enter the template values (as shown in the table below).
  4. Click Save.

The following table shows template fields and descriptions.

FieldsDescription
NameProvide name for template. Example: Critical Alert HTTP Request Template
Custom Templating Variablesn/a
Request URLProvide request URL details as:
  • Method: POST
  • Raw URL:
    https://<api-url>/api/oauth2/tenants/{tenantId}/alert?vtoken={token}
    Replace Tenant Id and Token copied while selecting authentication type in OpsRamp.
  • URL Encoding: UTF-8
AuthenticationProvide authentication details as:
  • Type: OAUTH2
  • User Name: OpsRamp username
  • Password: OpsRamp password
  • Confirm Password: Re-type OpsRamp password
Custom Request Headersn/a
PayloadProvide payload details as:
  • MIME Type: application/json
  • Payload encoding: UTF-8
  • Encode URL: n/a
  • Payload: Click here to view the payloads.
Response Handling CriteriaEnter the criteria as:
  • Failure Criteria: n/a
  • Success Criteria:
    • Success Status Code: 200
    • Expect payload: n/a
    • Content Type: n/a
SettingsSelect One Request Per Event and leave the remaining fields with their respective default values.

HTTP request templates for alert status - critical

Name: Critical alert HTTP request template. Payload:

{
 "serviceName": "${latestEvent.affectedEntities[0].entityTypeDisplayName}",
 "device": {
  "hostName": "${latestEvent.node.name}"
 },
 "subject": "${latestEvent.summaryMessage}",
 "alertTime": "${latestEvent.eventTime.getYear()}-${latestEvent.eventTime.getMonth()}-${latestEvent.eventTime.getDate()} ${latestEvent.eventTime.getHours()}:${latestEvent.eventTime.getMinutes()}:${latestEvent.eventTime.getSeconds()}",
 "currentState": "CRITICAL",
 "app": "APPDYNAMICS",
 "alertType": "",
 "component": "",
 "description": "${latestEvent.eventMessage}",
 "monitorName": "${latestEvent.affectedEntities[0].entityTypeDisplayName}"
}

HTTP request templates for alert status - warning

Name: Warning alert HTTP request template Payload:

{
 "serviceName": "${latestEvent.affectedEntities[0].entityTypeDisplayName}",
 "device": {
  "hostName": "${latestEvent.node.name}"
 },
 "subject": "${latestEvent.summaryMessage}",
 "alertTime": "${latestEvent.eventTime.getYear()}-${latestEvent.eventTime.getMonth()}-${latestEvent.eventTime.getDate()} ${latestEvent.eventTime.getHours()}:${latestEvent.eventTime.getMinutes()}:${latestEvent.eventTime.getSeconds()}",
 "currentState": "WARNING",
 "app": "APPDYNAMICS",
 "alertType": "",
 "component": "",
 "description": "${latestEvent.eventMessage}",
 "monitorName": "${latestEvent.affectedEntities[0].entityTypeDisplayName}"
}

HTTP request templates for alert status - recovery or self heal

Name: Self heal alert HTTP request template Payload:

{
 "serviceName": "${latestEvent.affectedEntities[0].entityTypeDisplayName}",
 "device": {
  "hostName": "${latestEvent.node.name}"
 },
 "subject": "${latestEvent.summaryMessage}",
 "alertTime": "${latestEvent.eventTime.getYear()}-${latestEvent.eventTime.getMonth()}-${latestEvent.eventTime.getDate()} ${latestEvent.eventTime.getHours()}:${latestEvent.eventTime.getMinutes()}:${latestEvent.eventTime.getSeconds()}",
 "currentState": "OK",
 "app": "APPDYNAMICS",
 "alertType": "",
 "component": "",
 "description": "${latestEvent.eventMessage}",
 "monitorName": "${latestEvent.affectedEntities[0].entityTypeDisplayName}"
}

Step 2: Create action

An action is a predefined, reusable, automated response to an event. You can use actions to automate your runbooks. A policy can trigger an action in response to any event.

Define how a specific action is triggered for an event when you configure policies. HTTP Request is one of the actions.

You need to create three Actions to send Critical, Warning, and Recovery alerts to OpsRamp. The only difference while creating is the Name and selection of the HTTP Request Template.

Critical alerts action

  • Name: Critical alerts action
  • HTTP Request Template: Select the Critical alert HTTP request template option.

Warning alerts action

  • Name: Warning alerts action
  • HTTP Request Template: Select the Warning alert HTTP request template option.

Recovery or Self Heal alerts action

  • Name: Self heal alerts action
  • HTTP Request Template: Select the Self heal alert HTTP request template option.

To create individual actions for Critical, Warning, and Recovery alerts:

  1. Click Alert & Respond and click Actions on the left pane.
  2. Select an application or database from the Actions drop-down and click Create.
  3. From Create Action, select Make HTTP Request and click OK.
  4. From Create HTTP Request Action, provide a name for the action, select an HTTP template from the drop-down and click Save.
  • Name: Enter a name for the action (for example, self heal alerts action)
    • HTTP Request Template: Select the HTTP request template created for integration and the HTTP request template detail is automatically displayed.

After successful creation of an action, create a policy to specify actions to trigger when certain events occur.

Step 3: Create policy

Policies provide a mechanism for automating monitoring and problem remediation. Instead of continually scanning metrics and events for the many conditions that could suggest problems, you can proactively define the events that are of the greatest concern for keeping your applications running smoothly and create policies that specify actions to start automatically when those events occur.

Individual policies must be created to send Critical, Warning, and Recovery alerts to OpsRamp. These policies differ only for Name, trigger health rule violation events, and respective actions.

To create individual policies for Critical, Warning, and Recovery alerts:

  1. Click Alert & Respond and click Policies on the left pane.
  2. Select context from the Policies drop-down menu and click Create.
  3. From Create Policy, click Trigger, select the health rule violation events (as shown in the table below), and click Next.
  4. On the left pane, click Actions and select an action for the event.
  5. From the Action page, select the appropriate action and click Select.
  6. Click Save.
Policy triggers for alert - CriticalPolicy triggers for alert - WarningPolicy triggers for alert - Recovery or Self heal
Name: Enter name for policy Example: Critical alerts policyName: Enter name for policy Example: Warning alerts policy.Name: Enter name for policy Example: Self heal alerts policy
Select trigger health rule violation events as:
  • Health Rule Violation Started Critical
  • Health Rule Violation Continues Critical
  • Health Rule Violation Upgraded - Warning to Critical
Select trigger health rule violation events as:
  • Health Rule Violation Started Warning
  • Health Rule Violation Continues Warning
  • Health Rule Violation Downgraded - Critical to Warning
Select trigger health rule violation events as:
  • Health Rule Violation Ended Critical
  • Health Rule Violation Ended Warning
  • Health Rule Violation Cancelled Critical
  • Health Rule Violation Cancelled Warning

When an event occurs, policy fires a specific action assigned to that event.