電子メールテンプレートの例

Splunk AppDynamics はこの電子メールテンプレートを使用して、Kubernetes 環境で発生したイベントの詳細を通知します。イベントタイプを有効にすることで、通知が必要なイベントの詳細をカスタマイズできます。
PYTHON
#if( $!{notificationConfigText} != "" )
$!{notificationConfigText}
#else
AppDynamics
#end

Event Notification for the "${latestEvent.application.name}" Application

Event Notification Name: ${policy.name}
Event Notification Severity: ${topSeverity}


Summary of events occurring during the ${policy.digestDurationInMins}+ minute(s) prior to ${action.triggerTimeWithZone}:
## Summary table

|| Event Type | Count ||

## Copy this row for each event type and count
#foreach($eventTypeEntry in $fullEventsByTypeMap.entrySet())
|| ${eventTypeEntry.getKey()} | ${eventTypeEntry.getValue().size()} ||
#end


## Full List of Events
The following events occurred during the time frame:
#if ($clamped)
Warning: The event list has been clamped at ${clampLimit} results! Please see the event and/or request snapshot viewers for the full list of events.
#end

## ==========================
## Define a reusable macro
## ==========================
#macro(printEventRow $event)
  ## If modern entity is present
  #if($event.modernEntity)
    || ${event.eventTimeWithZone}
    | ${event.displayName}
    | ${event.severity}
    | ${event.modernEntity.name}
    | #if($event.modernEntity.entityTypeDisplayName)
        ${event.modernEntity.entityTypeDisplayName}
      #else
        ${event.modernEntity.entityType}
      #end
    | ${event.summaryMessage} ||

  ## If DB present
  #elseif($event.db)
    || ${event.eventTimeWithZone}
    | ${event.displayName}
    | ${event.severity}
    | ${event.db.name}
    | Database
    | ${event.summaryMessage} ||

  ## If Node present
  #elseif($event.node)
    || ${event.eventTimeWithZone}
    | ${event.displayName}
    | ${event.severity}
    | ${event.node.name}
    | Node
    | ${event.summaryMessage} ||

  ## Fallback: Tier
  #else
    || ${event.eventTimeWithZone}
    | ${event.displayName}
    | ${event.severity}
    | ${event.tier.name}
    | Tier
    | ${event.summaryMessage} ||
  #end
#end


## ==========================
## Main Logic Starts Here
## ==========================
#if($allEventsHaveNoModernEntity)

## -------- OLD FORMAT TABLE --------
|| Event Time | Event Type | Severity | DB | Tier | Node | Summary ||
#foreach($eventList in $clampedEventsByTypeMap.values())
  #foreach($event in $eventList)
    || ${event.eventTimeWithZone}
    | ${event.displayName}
    | ${event.severity}
    | $!{event.db.name}
    | $!{event.tier.name}
    | $!{event.node.name}
    | ${event.summaryMessage} ||
  #end
#end

#else

## -------- NEW FORMAT TABLE --------
|| Event Time | Event Type | Severity | Name | Type | Summary ||

#foreach($eventList in $clampedEventsByTypeMap.values())
  #foreach($event in $eventList)
    #printEventRow($event)
  #end
#end

#end




Event Notification from AppDynamics.

This is an auto-generated email summarizing events on the "${latestEvent.application.name}" application. You are receiving this because you are configured as a recipient on the "${policy.name}" event notification. This is not necessarily an exhaustive list of all events during this time frame. Only those event types enabled in the notification will appear in this message.