Skip to end of metadata
Go to start of metadata

This topic describes the predefined variables that can be used in an HTTP request template or in an Email template.

The policy engine substitutes the value of the variable in the context of the triggering event(s) when it sends the actual request or email.

Forming Variable Names

To form a predefined variable name, combine the base name of the variable with a field of its corresponding info class.

For example, to use the account name as a variable in a template, combine the base name "account" with the "name" field of the EntityInfo class to form the variable ${account.name}.

Or, to use the trigger time of an action as a variable, combine the base name "action" with the "triggerTime" field of the ActionInfo class to form the variable ${action.triggerTime}.

You can chain the segments of the variable name where the info class field is itself the type of a base name. For example, to use the name of the application in which the latest triggering event occurred, combine the "latestEvent" base name with the "application" field of the EventInfo class (from the latestEvent) with the name field of the EntityInfo class (from the application) to form ${latestEvent.application.name}.

Base Names

These are the base names for the predefined variables with their corresponding info classes:

Base NameDescriptionInfo Class
accountAccount in which the action was triggeredEntityInfo
policyPolicy that triggered the actionPolicyInfo
actionTriggered actionActionInfo
topSeverityINFO, WARN or ERRORNotificationSeverity
topSeverityImageSeverity image or iconImageInfo
notificationConfigTextEmail actions onlyString
controllerUrlURL of the controllerString
appDynamicsIcon ImageInfo
appDynamicsLogo ImageInfo
latestEventMost recent triggering eventEventInfo
fullEventListList of events that triggered the actionList<EventInfo>
fullEventsByTypeMapList of events that triggered the action, grouped by typeMap<String, List<EventInfo>>
clampLimitOptional setting, limit on how many triggering events to display
clampedTrue if clamp limit is setboolean
clampedEventListn most recent triggering events if clampedList<EventInfo>
clampedEventsByTypeMapn most recent triggering events if clamped, grouped by typeMap<String, List<EventInfo>>

Info Classes for Templating Variables

Use the fields in the appropriate class, based on the table above, to form the variable to use in a template.

class EventInfo {
  EventType eventType
  long id
  String guid
  String eventTypeKey
  Date eventTime
  String displayName
  String summaryMessage
  String eventMessage
  EntityInfo application
  EntityInfo tier
  EntityInfo node
  List<EntityInfo> affectedEntities
  boolean healthRuleEvent
  EntityInfo healthRule // * Only defined when healthRuleEvent == true
  EntityInfo incident // * Only defined when healthRuleEvent == true
  boolean healthRuleViolationEvent
  NotificationSeverity severity
  ImageInfo severityImage
  boolean btPerformanceEvent // * true when eventType matches one of the BT performance event types
  String deepLink

class ImageInfo {
  String name
  String fileName
  String mimeContentRef
  String deepLink

class EntityInfo {
  EntityType entityType
  String entityTypeDisplayName
  long id
  String name

class PolicyInfo {
  EntityType entityType
  String entityTypeDisplayName
  long id
  String name
  boolean digest

class ActionInfo {
  EntityType entityType
  String entityTypeDisplayName
  long id
  String name
  Date triggerTime

enum NotificationSeverity { INFO, WARN, ERROR }


HTTP request example for most recent triggering event:


HTTP request example iterating through a list of triggering events:

#foreach(${event} in ${fullEventList})

Email HTML body example:

<h1>Summary of events occurring during the ${policy.digestDurationInMins}+ minute(s) prior to ${action.triggerTime}:</h1>


#foreach(${eventList} in ${fullEventsByTypeMap.values()})
  #foreach(${event} in ${eventList})

            <!-- Event icon -->
            <img src="${event.severityImage.mimeContentRef}" alt="${event.severity}" />
            <!-- Event name with event link -->
            <a href="${event.deepLink}">${event.displayName}</a>
            <!-- Event message -->



If these predefined variables do not meet all your needs, you can define your own custom variables for use in these templates in the Create Template window. Do not use any of the predefined variable names for your custom variables.

  • No labels