What are the steps to integrate Microsoft Teams to receive AppDynamics alerts?
Table of Contents
Prepare Microsoft Teams
Prepare AppDynamics HTTP alerts
Complete the integration
Prepare Microsoft Teams
In Microsoft Teams, create a new team and note its name. This is the team that will receive AppDynamics events notifications.
Go to Apps, and search for “webhook”
Click the utility Incoming Webhook, then click Add to a team.
From the drop-down, choose the team you created above and click Install.
Set up the connector and choose a name for the webhook.
Copy the generated URL, which will be something like this: https://outlook.office.com/webhook/37226f5b-90ac-40f8-a466- 83eec544c851@ca16bbdf-ec49-4885-b852- 6cdb00bef55c/IncomingWebhook/aa2649914f264baca894ad45728cdb84/3d9bab89 -1d3f-401b-9c0d-0daeb112f47b
Prepare AppDynamics
In AppDynamics, create a new HTTP template (Alert & Respond > HTTP Request Templates > New)
Set these Request URL parameters:
Method: POST Raw URL: (paste the generated URL from step 6 above) URL Encoding: UTF-8
Scroll down to Payload (choose MIME type:Application/JSON, Encoding :UTF-8) and insert the following script: {
"@context": "http://schema.org/extensions",
"@type": "MessageCard",
"title": "Event Detected for ${latestEvent.application.name} on node
${latestEvent.node.name}",
"text": "${latestEvent.displayName} - ${latestEvent.eventTime} :
${latestEvent.eventMessage} ",
"themeColor": "#if($latestEvent.severity == "INFO")0075FF#elseif($latestEvent.severity ==
"WARN" )ff9500#elseif($latestEvent.severity == "ERROR" )ff3b30#end", "sections": [
{
"activityTitle": "Severity: $latestEvent.severity",
"images": [ {
"image":"${latestEvent.severityImage.deepLink}"
} ]
}, {
"value": "[here](${latestEvent.deepLink})" },
{
"facts": [
{
"name": "View Event",
"value": "[click here](${latestEvent.deepLink})",
},
{
"name": "Open Controller",
"value": "[click here](${controllerUrl} )" }
] },
] }
Click Save.
Complete the Integration
Generate some events on AppDynamics, then return to Microsoft Teams and check the Team’s notifications.
You should see that the events you generated have been received.
... View more