AppDynamics Integration Guide
AppDynamics is an application performance management system. It primarily focuses on providing solutions and analytics tools to help companies to manage the their cloud environment. AppDynamics can be configured with TaskCall to effectively get on-call responders to resolve alarming system performance levels.
Pointers
- The integration is between a TaskCall service and AppDynamics.
- Incidents will automatically resolve in TaskCall when metrics fall back within the normal threshold.
- This integration only receives alerts in TaskCall from AppDynamics.
In TaskCall
- Go to Configurations > Integrations and click New Integration.
- Select the AppDynamics integration.
- Give the integration a name and configure how incidents will be created. Only the Default Service field is required. The rest are optional.
- Incidents (Optional)
- TaskCall automatically maps incoming payloads with internal attributes to create incidents. However, this can be customized in the Incidents tab. Constant values can be included alongside placeholders to dictate which attributes should map to the Incident Title, Description, Tags, Snapshots and Vendor URL. To insert a placeholder use double curly braces.
For example, if you enter {{ alert.title }} in the Incident Title field, TaskCall will look for an attribute called "title" nested inside another attribute called "alert" in the incoming payload. If the nested attribute exists, its corresponding value will be pulled from the payload and inserted. If the nested attribute does not resolve successfully, TaskCall will fall back to the default mapping.
If you are unsure, please leave the fields empty. TaskCall will use the default mapping to create the incident for you. - Select the Urgency level the incident should be created at.
- Select the option to Group similar alerts together if you would like follow up triggers from the same alert source to be grouped into the same incident. If you leave this option unchecked, then a new incident will be created for every trigger. (This behavior is specific to new triggers; not updates to an alert.)
- Click Next to move on to the Services tab.
- TaskCall automatically maps incoming payloads with internal attributes to create incidents. However, this can be customized in the Incidents tab. Constant values can be included alongside placeholders to dictate which attributes should map to the Incident Title, Description, Tags, Snapshots and Vendor URL. To insert a placeholder use double curly braces.
- Services (Required)
- Select the Default Service incidents should be sent to. To route incidents to different services instead, set Map With Attribute to the attribute to route by using a placeholder. Then, map each value it can take to the service that should receive it.
For example, to route by a region attribute sent in the payload, set Map With Attribute to {{ region }}, then map US to one service and EU to another, and so on.
- Click Next to move on to the Authorization tab.
- Select the Default Service incidents should be sent to. To route incidents to different services instead, set Map With Attribute to the attribute to route by using a placeholder. Then, map each value it can take to the service that should receive it.
- Authorization (Optional)
- The Authorization tab allows a Bearer Token and an IP Allowlist be added if you would like to restrict who is able to send alerts to this integration. If you are unsure, this can be skipped.
- Once done, click Save.
- Copy the Integration Url that is issued for the integration. This will be used to set up the notification in AppDynamics.
In AppDynamics
- Go to Alert & Respond > HTTP Request Templates. Click New.
- Give the template a name. Add a custom variable. Set the variable as state and the value as open.
- Set the request method to be POST. Paste the integration URL you copid over from TaskCall in the Raw URL section.
- In the Payload section, set the MIME Type to be application/json and then copy and paste the following payload:
{
"state": "$(state)",
"incident_key": "${latestEvent.application.id}-${latestEvent.node.id}",
"description": "${latestEvent.displayName} on ${latestEvent.node.name}",
"client_url": "${controllerUrl}",
"event_name": "${latestEvent.displayName}",
"event_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}",
"event_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"
}]
}
- In the Request Handling Criteria section, add a success criteria. Set the Status Code as 200, check the Expect Payload checkbox, and set the Content Type as application/json.
- In the Settings, select the One Request Per Event checkbox and then click Save.
- What we have set up so far is the payload that would be sent to TaskCall. Now we need to determine the actions or conditions that would trigger the payload.
- Go to Alert & Respond > Actions. Select the type of system the action should be for and then click Create.
- Choose the Make an HTTP request radio button and then click Ok.
- Give the action a name and select the template you created. This should show all the template information. Then click Save.
- With that we have set up an action that would trigger an incident on TaskCall when an alert is created in AppDynamics. Now we need to set up an action that would resolve the incident automatically when the alert itelf resolves in AppDynamics.
- Create another action by following the same steps. Only change the value of the state in the Custom Templating Variables to resolved.
- Once both actions are created, incidents will be triggered on TaskCall when alerts are raised from AppDynamics. They will also resolve automatically when the alerts themselves resolve.