Introduction
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 Basic or Webhook Authentication.
Integration is tested on AppDynamics version: 4.5.16
Note
OpsRamp recommends webhook-based integration.OpsRamp configuration
To configure OpsRamp for AppDynamics integration:
- Go to Setup > Integrations > Integrations and select a client.
The installed and available integrations of the selected client appear. - From Available Integrations, go to Monitoring > AppDynamics.
- On the AppDynamics Integration screen, click Install.
- Select authentication type as BASIC or WEBHOOK and click Save.
- Make a note of the details. These details are used while creating an HTTP Request template during AppDynamics configuration.
- If WEBHOOK is selected, copy the Tenant ID, Token and Webhook URL.
- If BASIC is selected, copy the Tenant Id and Token.
- Expand the Map attributes section and perform the following:
- Enter details to map the Status field.
- Select OpsRamp Entity
Alert
and OpsRamp PropertyStatus
from the drop-down menu.
- Click the + button to define mappings.
The following table shows the property mappings.
Third-Party Entity | OpsRamp Entity | Third-Party Property | OpsRamp Property (non-editable) | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Problem | Alert | currentState
| alert.currentState | ||||||||
Alert | ALERT | serviceName | alert.serviceName | ||||||||
Alert | ALERT | description | alert.description | ||||||||
Alert | ALERT | device.hostName | alert.deviceName | ||||||||
Alert | ALERT | alertTime | alert.alertTime | ||||||||
Alert | ALERT | subject | alert.subject |
Note
Mappings can be modified later as desired.AppDynamics configuration for Webhook-based authentication
Configuration for webhook-based authentication involves:
- Creating HTTP request templates
- Creating actions
- Creating policies
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 when the policy initiates the action. These templates are reusable by different HTTP request actions within 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:
- Log into AppDynamics.
- Click Alert & Respond, click HTTP Request Templates on the left pane.
- Click New to create an HTTP request template and provide the template values (as shown in the following table).
- Click Save.
The following table shows template fields and descriptions.
Fields | Description |
---|---|
Name | Provide name for template. Example: Critical Alert HTTP Request Template |
Custom Templating Variables | n/a |
Request URL | Provide request URL details as:
|
Authentication | Provide authentication details as:
|
Custom Request Headers | n/a |
Payload | Provide payload details as:
|
Response Handling Criteria | Provide the criteria as:
|
Settings | Select 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. You 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 HTTP Request Template. Critical alerts action - Name: Critical alerts action - HTTP Request Template: Select ‘Critical alert HTTP request template’ option Warning alerts action - Name: Warning alerts action - HTTP Request Template: Select ‘Warning alert HTTP request template’ option Recovery or Self Heal alerts action - Name: Self heal alerts action - HTTP Request Template: Select ‘Self heal alert HTTP request template’ option
To create individual actions for Critical, Warning and Recovery alerts:
- Click Alert & Respond, click Actions on the left pane.
- Select an application or database from the Actions drop-down and click Create.
- From Create Action, select Make HTTP Request and click OK.
- From Create HTTP Request Action, provide name for the action,
select an HTTP template from the drop-down and click Save.
- Name: Give 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 upon selection of the template.
After successful creation of an action, create a policy where you can 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 then 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:
- Click Alert & Respond, click Policies on the left pane.
- Select context from the Policies drop-down menu and click Create.
- From Create Policy, click Trigger, select the health rule violation events (as shown in the following table) and click Next.
- On the left pane, click Actions and select an action for event.
- From the Action page appears, select the appropriate action and click Select.
- Click Save.
Policy triggers for alert - Critical | Policy triggers for alert - Warning | Policy triggers for alert - Recovery or Self heal |
---|---|---|
Name: Provide name for policy Example: Critical alerts policy | Name: Provide name for policy Example: Warning alerts policy. | Name: Provide name for policy Example: Self heal alerts policy |
Select trigger health rule violation events as:
| Select trigger health rule violation events as:
| Select trigger health rule violation events as:
|
Note
When an event occurs, policy fires a specific action assigned to that event.AppDynamics configuration for Basic authentication
Configuration for Basic authentication involves:
- Creating HTTP request templates
- Creating actions
- Creating policies
OpsRamp integrates AppDynamics alerts through HTTP APIs, hence you are required to configure the action Make HTTP Request in AppDynamics. A HTTP request template describes the alert data that will be sent to OpsRamp.
Note
An HTTP request template is mandatory to create a HTTP request action.Step 1: Create HTTP request template
To create individual HTTP request templates for Critical, Warning and Recovery alerts.
- Log into AppDynamics.
- Go to Alert & Respond > HTTP Request Templates and click New.
- Provide HTTP request template values.
Fields | Description |
---|---|
Name | Provide name for template. Example: Critical Alert HTTP Request Template |
Custom Templating Variables | n/a |
Request URL | Provide request URL details as:
|
Authentication | Provide authentication details as:
|
Custom Request Headers | n/a |
Payload | Provide payload details as:
|
Response Handling Criteria | Provide the criteria as:
|
Settings | Select One Request Per Event and leave the remaining fields with their respective default values. |
Payload for critical alert status
This provides the payload for a HTTP request template with an alert status of 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}"
}
Payload for warning alert status
This provides the payload for a HTTP request template with an alert status of 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}"
}
Payload for recovery alert status
This provides the payload for a HTTP request template with an alert status of recovery or _self heal>. HTTP Request Template 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
To create individual actions for critical, warning, and recovery** alerts:
- Go to Alert & Respond > Actions, select the context from the Actions drop-down menu and click Create.
- Select Make HTTP Request and click OK.
- Provide a name for the action, select a HTTP template from the drop-down, and click Save. Template details appear automatically upon selection of the template.
Step 3: Create policy
To create individual policies for critical, warning, and recovery** alerts:
- Go to Alert & Respond > Policies, select the context from the Policies drop-down menu and click Create.
- Select Trigger, select the health rule violations, and Save.
- Go to Actions > Select Action, select the appropriate action and click Select.
The following tables describes the policy triggers for alerts.
Critical Policy Triggers | Warning Policy Triggers | Recovery (or self-heal) Policy Triggers |
---|---|---|
Name: Provide name for policy Example: Critical alerts policy | Name: Provide name for policy Example: Warning alerts policy. | Name: Provide name for policy Example: Self heal alerts policy |
Select trigger health rule violation events as:
| Select trigger health rule violation events as:
| Select trigger health rule violation events as:
|