This page describes the predefined variables that can be used in an HTTP request action. The value of the variable is substituted at the run-time in the context of the triggering events when the actual request is sent.

Form Variable Names

To form a predefined variable name, combine the eventList array with a top level object and a corresponding context field or multiple nested context fields. You can also use the top level object only to fetch any information.

All the variables are accessed through the eventList array.

For example:

  • To get the ID of a health rule violation event, use ${eventList[0].event_id}
  • To get the name of the violating conditions of a health rule, use ${eventList[0].event_details.condition_details[0].name}
  • To get the details of the child entity type in a health rollup, use ${eventList[0].event_details.rollup_details.child_entities[0].child_entity_type}
  • To get the metric type that cause the anomaly, use ${eventList[0].anomaly_type}
  • To get the summary of the top object on which anomaly is detected, use ${eventList[0].rca_result.top_impact_object}

You must update all the existing HTTP actions with the new variable names listed on this page. After updating the variable names, link the existing HTTP actions again with the health rules. If you do not perform this task, the actions are not triggered with the corresponding health rules violation.

The following tables provide top level object and various context field details: 

Context Attributes

The following table provides a list of top level objects and corresponding details:

Top Level Object

DescriptionField Type
entity_idIdentifies the entity on which violation is detected.string
entity_type

Indicates the type of the entity on which violation is detected. The format is namespace:type.

For example, k8s:type.

string
event_idIdentifies the event.string
event_typeIndicates the display name of different violation types. For example, VIOLATION_STARTED_WARNING, VIOLATION_STARTED_CRITICAL.string

violation_id

Identifies the violation incident.

string

event_time

Indicates the timestamp of the violation incident in milli-seconds.

long

violation_start_time

Indicates the start time of the violation incident in milli-seconds.

long

violation_end_time

Indicates the end time of the violation incident in milli-seconds.

long
violation_durationIndicates the duration of violation incident. It is the difference between the current time and the start time of the incident.long
violation_severityIndicates the severity of violation such as critical or warning.string
violation_statusIndicates whether the violation incident is open or close.string
violation_typeIndicates the type of MELT event for health rule or anomaly detection. For example, 

alerting:healthrule.violationtroubleshooting.

string

config_id

Identifies the health rule or the Anomaly Detection configuration.

string

config_name

Indicates the display name for the health rule or the Anomaly Detection configuration.

string
event_detailsIndicates the details of the violation based on a health rule.
  • complex
  • object event_details
model_sensitivity

Indicates the alert sensitivity levels of the anomaly detection model. These are the sensitivity levels:

  • TEST
  • LOW
  • MEDIUM
  • HIGH
string
anomaly_typeIndicates the metric type that causes the anomaly. For example, Errors per minute (EPM) and Average Response time (ART).string
rca_resultIndicates result of the root cause analysis performed by the Anomaly Detection algorithm.object


The following table provides a list of second level context fields and corresponding details for the rca_result variable:

Second Level Context Fields - rca_result

DescriptionField Type
top_impact_object

Indicates the deviating metrics and summary information of top-impacted object on which anomaly is generated.

object

suspected_object_summaries

Indicates the deviating metrics and summary information of the root cause objects.

array

list_of_suspected_cause_pathsIndicates the path of the suspected cause of the anomaly.array


The following table provides a list of second level context fields and corresponding details for the event_details variable:

Second Level Context Fields - event_details

Description

Field Type

condition_details

Indicates the details of health rule violation. The details are available only for metric condition.

array of condition_details

rollup_details

Indicates the details of the rollup entities for the health rule violation.

complex

object rollup_details


The following table provides a list of third level context fields and corresponding details for the rollup_details variable:

Third Level Context Fields - rollup_details

DescriptionField Type
child_entitiesIdentifies the correlated incident and child entity.

array of rollup_result_details

violation_countIndicates the count of the violating child entities.long


The following table provides a list of fourth level context fields and corresponding details for the condition_details variable:

Fourth Level Context Fields - condition_details

DescriptionField Type
name

Indicates the display name of the condition.

string
data_pointsIndicates the number of data points used to evaluate the condition.string
eval_win_sizeIndicates the health rule evaluation time frame over which the data used to evaluate the health rule is collected. string
resultIndicates the status of the condition evaluation. It returns true (1), false (0), or unknown (-1).integer
baseline_meanIndicates the difference between the baseline and the mean value.double
baseline_std_devIndicates the difference between the baseline and the standard deviation.double
violation_countIndicates the number of condition violations during the evaluation time frame.string
missing_dataIndicates the number of missing data points in the evaluation time frame.string
expressionIndicates the mathematical expression used to evaluate the metric performance.string
expression_valueIndicates the value present in the left side of the expression.string
threshold_valueIndicates the value present in the right side of the expression.string
threshold_typeIndicates the type of threshold (static or baseline).string


The following table provides a list of fourth level context fields and corresponding details for the rollup_result_details variable:

Fourth Level Context Fields - rollup_result_details

Description

Field Type

child_entity_idIdentifies the evaluation child entity.string
child_entity_typeIndicates the evaluation child entity type name with namespace.string
correlated_incident_idIndicates the incident ID of the child entity that caused the rollup rule violation.string

Samples

HTTP request examples for the most recent triggering events:

Slack template sample

{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*New ${eventList[0].violation_severity} Alert from AppDynamics Cloud:* ${eventList[0].config_name}\n"
      }
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Entity Type:*\n${eventList[0].entity_type}"
        },
        {
          "type": "mrkdwn",
          "text": "*When:*\n${eventList[0].event_time}"
        },
        {
          "type": "mrkdwn",
          "text": "*Entity Id:*\n${eventList[0].entity_id}"
        }
      ]
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "emoji": true,
            "text": "Go to Alert in AppDynamics Cloud"
          },
          "style": "danger",
          "value": "click_me_123",
          "url": "https://your-appd-cloud-url.com"
        }
      ]
    },
    {
      "type": "divider"
    }
  ]
}  
CODE

PageDuty Events API V2 sample

{
  "payload": {
    "summary": "${eventList[0].event_type} on ${eventList[0].config_name}",
    "source": "AppDynamics Cloud",
    "severity": "${eventList[0].violation_severity.toLowerCase()}",
    "component": "${eventList[0].entity_type}",
    "custom_details": {
      "Event Name": "${eventList[0].event_type}",
      "Event ID": "${eventList[0].event_id}",
      "Entity Type": "${eventList[0].entity_type}",
      "Event Time": "${eventList[0].event_time}",
      "Entity ID": "${eventList[0].entity_id}"
    }
  },
  "routing_key": "60970b94731b440bc0af90d0ce14b0bb",
  "dedup_key": "${eventList[0].violation_id}",
  "event_action": "trigger",
  "client": "AppDynamics Cloud",
  "client_url": "https://your-appdynamics-cloud-url.com"
}
CODE