This documentation and the Cisco Observability Platform functionalities it describes are subject to change. Data saved on the platform may disappear and APIs may change without notice.
Introduction
An action is a predefined, reusable, and automated response to an event. Currently, you can create HTTP request actions in your solution that enables you to automatically trigger alerts to any third-party applications such as OpsGenie, PagerDuty, and Webex. When users subscribe to the solution in their tenants, they can view and choose these Create HTTP Request Action templates in Cisco Cloud Observability.
HTTP Action Template
You can create an HTTP request action based on the actions:httpactiontemplate schema and send alerts from the Cisco Observability Platform to a third-party application of your choice.
Default HTTP Action Templates
By default, you get the templates for the following third-party applications:
OpsGenie
PagerDuty
ServiceNow
Slack
Webex
You can use these templates in your solution to send alerts to specified third-party applications.
OpsGenie Template
The HTTP action template for OpsGenie is as follows:
{
"name": "OpsGenie HTTP Template",
"tagName": "OpsGenie",
"requestParameters": {
"requestType": "POST",
"rawUrl": "https://api.opsgenie.com/v2/alerts",
"encodingType": "UTF-8"
},
"requestHeaders": [
{ "key": "Authorization", "value": "GenieKey ${apiKey}" }
],
"requestPayload": {
"contentType": "application/json",
"rawPayload": "{\n \"source\": \"AppDynamics Cloud\",\n \"message\": \"${eventList[0].event_type} on ${eventList[0].config_name}\",\n \"alias\": \"${eventList[0].violation_id}\",\n \"description\": \"${eventList[0].event_type} on ${eventList[0].config_name}\",\n \"entity\": \"${eventList[0].entity_type}:${eventList[0].entity_id}\",\n #if( ${eventList[0].violation_severity} == \"CRITICAL\" )\n \"priority\": \"P1\",\n #elseif( ${eventList[0].violation_severity} == \"WARNING\" )\n \"priority\": \"P3\",\n #else\n \"priority\": \"P5\",\n #end\n \"details\": {\n \"Event Name\": \"${eventList[0].event_type}\",\n \"Event ID\": \"${eventList[0].event_id}\",\n \"Entity Type\": \"${eventList[0].entity_type}\",\n \"Event Time\": \"${eventList[0].event_time}\",\n \"Entity ID\": \"${eventList[0].entity_id}\",\n \"Link\": \"${appdURL}${eventList[0].entity_context_path}\"\n }\n}",
"encodingType": "UTF-8"
},
"customVariables": [
{ "key": "apiKey", "value": "" },
{ "key": "appdURL", "value": "" }
]
}
PagerDuty Template
The HTTP action template for PagerDuty is as follows:
{
"name": "PagerDuty HTTP Template",
"tagName": "PagerDuty",
"requestParameters": {
"requestType": "POST",
"rawUrl": "https://events.pagerduty.com/v2/enqueue",
"encodingType": "UTF-8"
},
"requestHeaders": [],
"requestPayload": {
"contentType": "application/json",
"rawPayload": "{\n \"payload\": {\n \"summary\": \"${eventList[0].event_type} on ${eventList[0].config_name}\",\n \"source\": \"AppDynamics Cloud\",\n \"severity\": \"${eventList[0].violation_severity.toLowerCase()}\",\n \"component\": \"${eventList[0].entity_type}\",\n \"custom_details\": {\n \"Event Name\": \"${eventList[0].event_type}\",\n \"Event ID\": \"${eventList[0].event_id}\",\n \"Entity Type\": \"${eventList[0].entity_type}\",\n \"Event Time\": \"${eventList[0].event_time}\",\n \"Entity ID\": \"${eventList[0].entity_id}\"\n }\n },\n \"routing_key\": \"${integrationKey}\",\n \"dedup_key\": \"${eventList[0].violation_id}\",\n \"event_action\": \"trigger\",\n \"client\": \"AppDynamics Cloud\",\n \"client_url\": \"${appdURL}${eventList[0].entity_context_path}\"\n}",
"encodingType": "UTF-8"
},
"customVariables": [
{ "key": "integrationKey", "value": "" },
{ "key": "appdURL", "value": "" }
]
}
ServiceNow Template
The HTTP action template for ServiceNow is as follows:
{
"name": "ServiceNow HTTP Template",
"tagName": "ServiceNow",
"requestParameters": {
"requestType": "POST",
"rawUrl": "https://${instanceName}.service-now.com/api/global/em/jsonv2",
"encodingType": "UTF-8"
},
"requestPayload": {
"contentType": "application/json",
"rawPayload": "{\n \"records\": [\n {\n \"source\": \"AppDynamics Cloud\",\n \"event_class\": \"${tenantName}\",\n \"resource\": \"${eventList[0].entity_id}\",\n \"node\": \"${eventList[0].entity_id}\",\n \"metric_name\": \"${eventList[0].config_name}\",\n \"type\": \"${eventList[0].event_type}\",\n \"message_key\": \"${eventList[0].violation_id}\",\n \"description\": \"*New ${eventList[0].violation_severity} Alert from AppDynamics Cloud:* ${eventList[0].config_name}. Check ${appdURL}${eventList[0].entity_context_path}\",\n #if( ${eventList[0].violation_severity} == \"CRITICAL\" )\n \"severity\": \"1\"\n #elseif( ${eventList[0].violation_severity} == \"WARNING\" )\n \"severity\": \"2\"\n #else\n \"severity\": \"0\"\n #end \n }\n ]\n}",
"encodingType": "UTF-8"
},
"customVariables": [
{ "key": "instanceName", "value": "" },
{ "key": "tenantName", "value": "" },
{ "key": "appdURL", "value": "" }
]
}
Slack Template
The HTTP action template for Slack is as follows:
{
"name": "Slack HTTP Template",
"tagName": "Slack",
"requestParameters": {
"requestType": "POST",
"rawUrl": "",
"encodingType": "UTF-8"
},
"requestPayload": {
"contentType": "application/json",
"rawPayload": "{\n \"blocks\": [\n {\n \"type\": \"section\",\n \"text\": {\n \"type\": \"mrkdwn\",\n \"text\": \"*New ${eventList[0].violation_severity} Alert from AppDynamics Cloud:* ${eventList[0].config_name}\\n\"\n }\n },\n {\n \"type\": \"section\",\n \"fields\": [\n {\n \"type\": \"mrkdwn\",\n \"text\": \"*Entity Type:*\\n${eventList[0].entity_type}\"\n },\n {\n \"type\": \"mrkdwn\",\n \"text\": \"*When:*\\n${eventList[0].event_time}\"\n },\n {\n \"type\": \"mrkdwn\",\n \"text\": \"*Entity Id:*\\n${eventList[0].entity_id}\"\n }\n ]\n },\n {\n \"type\": \"section\",\n \"text\": {\n \"type\": \"mrkdwn\",\n \"text\": \"*Violating Conditions*\\n\"\n }\n },\n #foreach( $condition in ${eventList[0].event_details.condition_details} )\n {\n \"type\": \"section\",\n \"text\": {\n \"type\": \"mrkdwn\",\n \"text\": \"\\n${condition.expression}\"\n } \n }, \n #end\n {\n \"type\": \"actions\",\n \"elements\": [\n {\n \"type\": \"button\",\n \"text\": {\n \"type\": \"plain_text\",\n \"emoji\": true,\n \"text\": \"Go to Alert in AppDynamics Cloud\"\n },\n \"style\": \"danger\",\n \"value\": \"click_me_123\",\n \"url\": \"${appdURL}${eventList[0].entity_context_path}\"\n }\n ]\n },\n {\n \"type\": \"divider\"\n }\n ]\n}",
"encodingType": "UTF-8"
},
"customVariables": [ { "key": "appdURL", "value": "" } ]
}
Webex Template
The HTTP action template for Webex is as follows:
{
"name": "Webex HTTP Template",
"tagName": "Webex",
"requestParameters": {
"requestType": "POST",
"rawUrl": "",
"encodingType": "UTF-8"
},
"requestPayload": {
"contentType": "application/json",
"rawPayload": "{\"markdown\": \" \\n- - - \\n**${eventList[0].violation_severity}** Alert from AppDynamics Cloud: **${eventList[0].config_name}** \\n- - - \\n**Details** \\n _Event Type:_ ${eventList[0].event_type} \\n_Entity Type:_ ${eventList[0].entity_type} \\n_Entity Id:_ ${eventList[0].entity_id} \\n_Event Time:_ ${eventList[0].event_time}\\n**Violation Details** #foreach( $condition in ${eventList[0].event_details.condition_details} ) \\n${condition.expression} #end \\n_Link:_[Click here](${appdURL}${eventList[0].entity_context_path})\\n- - - \\n\" }",
"encodingType": "UTF-8"
},
"customVariables": [
{ "key": "appdURL", "value": "" }
]
}