Documentation forDatabase Performance Analyzer

Create or edit a custom email template for DPA alert notifications

Use custom email templates to customize the contents of the email notification that DPA sends when an alert is triggered. You can create multiple custom email templates for different types of alerts.

  1. On the DPA menu, click Alerts.
  2. Click the Email Templates tab.
  3. Do one of the following: 

    • To create a new email template, click Create email template.

      The Create email template page opens. It includes the system-defined template definition as a starting point.

    • To edit an existing email template, click the email template name.

      The Edit email template page displays the existing template definition.

  4. Enter a unique name and, optionally, a description.
  5. Specify the content and formatting of email notifications based on this template:
    • To add content:

      • Drag and drop variables from the right panel into the Subject line or body (or type the variables). These variables represent information about the triggered alert or links to additional information in DPA. For information about the available variables, see Email template variables.

      • Type static text into the Subject line or body.

    • To remove content, delete variables or static text from the Subject line or body.

    • To format body text with bold, italics, or line breaks: 

      1. Under Body message format, select HTML.

        If Plain text is selected, any HTML tags are treated as text and shown in the alert notification email.

      2. Enter the following tags to format the body text:

        <b> </b>
        <i> </i>
        <br> or <br />

        All other tags are unsupported. You cannot save a template that contains unsupported tags.

  6. Click Save to save your changes and close the page.
  7. Apply the email template to alerts in either of the following ways:

Email template variables

The following variables are available:

Alert variables

Use these variables to include information about the alert that was triggered.

Name Variable Description
Alert name [=alert.alertName] The user-defined name that identifies the alert that was triggered.
Type [=alert.type] The type of alert.
Description [=alert.description] DPA's description of the alert type.
Value [=alert.value] The value that triggered the alert.
Execution time [=alert.executionTime] The date and time when the alert was triggered.
Multiple results [=alert.multiReturn] A value of true or false to indicate whether the alert returns multiple values.
Results

[#list alert.results as result]
[=result.category]: [#if result.parameterName??][=result.parameterName][#else] [/#if]
[=result.label]: [=result.value] [#if result.units??][=result.units][#else] [/#if]
[=result.description]
[/#list]

For Custom alerts that return multiple values, the parameter name, value, units (if specified in the alert parameters), and description (if specified in the alert parameters) for each returned value.
Thresholds [#list alert.threshold as t]
Threshold level: [=t.level]
* min: [#if t.levelMin??][=t.levelMin][#else]N/A[/#if]
* max: [#if t.levelMax??][=t.levelMax][#else]N/A[/#if]
[/#list]

The minimum and maximum values for threshold levels that are specified in the alert definition.

This variable does not return threshold information for Resources alerts because the thresholds are defined on the resource instead of in the alert definition.

Alert Notification text [=alert.notificationText] The text from the Notification Text field in the alert definition.
Alert Parameters [#list alert.alertParameters as parameter, value]
[=parameter]: [=value]
[/#list]

For Wait Time and Administrative alerts, the name and value of the each parameter specified for the alert. If the alert type does not require parameters, this is blank.

Resources parameters [#list alert.resourceParameters as parameter, value]
[=parameter]: [=value]
[/#list]

For Resources alerts, the name and value of each parameter specified for the alert.

Alert Group ID [=alert.group.id] The ID of the alert group that the alert belongs to.
Alert Group Name [=alert.group.name] The name of the alert group that the alert belongs to.
Alert Group Description [=alert.group.description] The user-defined description of the alert group that the alert belongs to.
Alert Status Value [=alert.status.value] The status of the alert (for example, High or Broken).
Alert Error Message [=alert.status.message] When the alert is Broken, the error message generated when the alert is triggered.
Single Alert [=alert.singleAlert] A value of true or false to indicate whether multiple result values are sent in a single message. True indicates that multiple results are sent in one message, and false indicates that they are sent separately.

Database variables

Use these variables to include information about the monitored database instance on which the alert was triggered.

Name Variable Description
Name [=database.name] The DPA display name of the monitored database instance.
Type [=database.databaseType] The type of monitored database instance.
IP address [=database.ipAddress] The IP address of the database server.
Hostname [=database.hostname] The host name of the database server.
Port [=database.port] The port used by the monitored database instance.
Version [=database.databaseVersion] Version of the monitored database instance.
Full type [=database.databaseFullType] The full type of the monitored database instance.

Link variables

Use these variables to include links to related information in DPA.

Name Variable Description
Alert Status [=links.alertStatus] A link to the Alert Status tab, from which you can view the status and history of the alert.
Alert Trends [=links.alertTrends] A link to the 1-day trends chart for the day on which the alert was triggered.
Alert History [=links.alertHistory] A link to the detailed history of the alert on the database instance where it was triggered.
Instance Alerts [=links.instanceAlerts] A link to the Alert Status tab filtered to show only the alerts configured to run on the database instance where the alert was triggered.
Notification [#list links.notification as label, url]
[=label]: [=url]
[/#list]

A link to the DPA chart associated with the alert type. For example, the link for a Database Instance Wait Time Anomaly alert opens the Anomaly Detection chart for the day when the alert was triggered. If no chart is associated with the alert type, this is blank.

DPA alert variables

These variables define the default DPA alert content.

Name Variable Description
Subject [=dpa.subject]

The default subject line of an email alert. This variable includes the alert name, the database instance, and the alert level in the following format:

Alert Name (Database Instance) - ALERT LEVEL

For example: 

Total SQL Wait Time for Memory/CPU Waits (MyDatabaseInstance) - HIGH

Results [=dpa.body]

The default body text of an email alert. This variable includes the alert status link, the alert notification text, and the value that triggered the alert. Each element is a separate paragraph. For example: 

View Alert Status: http://xxxxxxxx:8123/iwc/alertMain.iwc

The total wait time for Memory/CPU waits has exceeded a threshold.

Value: 600 seconds

Custom properties

You can use the DPA REST API to create custom properties that can be used in alert notification email templates. If any custom properties have been created for this DPA server, they are displayed in the list of variables.