This topic describes the system variables that you can use in the title or content of an alert notification.

When you configure a notification method for an alert rule, you can use the ${fieldName} syntax in the title or content of an alert notification to reference a system variable. Log Service replaces the system variable in the title or content with the real value before sending the alert notification. For example, Log Service replaces ${Project} with the name of the project to which the alert rule belongs.
Note You must reference valid variables. If a referenced variable does not exist or is invalid, Log Service processes the variable as an empty string. If a variable references a value of the object type, the value is displayed in the JSON format in this topic.
The following table lists the available system variables and how to reference these variables.
Variable Description Example value Example title or content
Aliuid The ID of the Alibaba Cloud account to which the project belongs. 1234567890 An alert is triggered under the Alibaba Cloud account ${Aliuid}.
Project The project to which the alert rule belongs. my-project An alert is triggered in the ${Project} project.
AlertID The ID of the alert rule evaluation. 0fdd88063a611aa114938f9371daeeb6-1671a52eb23 The ID of the alert rule evaluation is ${AlertID}.
AlertName The name of the alert rule. The name is unique within a project. alert-1542111415-153472 The ${AlertName} alert is triggered.
AlertDisplayName The display name of the alert. My alert The ${AlertDisplayName} alert is triggered.
Condition The trigger condition of the alert rule. Variables in the trigger condition are replaced with the values that trigger the alert. Each value is enclosed in a pair of brackets []. [5] > 1 The alert is triggered because ${Condition}.
RawCondition The original trigger condition of the alert rule. Variables in the trigger condition are not replaced with the real values. count > 1 The trigger condition is ${RawCondition}.
Dashboard The name of the dashboard with which the alert rule is associated. mydashboard The alert rule is associated with the ${Dashboard} dashboard.
DashboardUrl The URL that points to the dashboard with which the alert rule is associated. https://sls.console.aliyun.com/next/project/myproject/dashboard/mydashboard You can visit the following link to view the dashboard with which the alert rule is associated: ${DashboardUrl}.
FireTime The time when the alert is triggered. 2018-01-02 15:04:05 The alert is triggered at ${FireTime}.
FullResultUrl The URL that points to the information of the alert. https://sls.console.aliyun.com/next/project/my-project/logsearch/internal-alert-history?endTime=1544083998&queryString=AlertID%3A9155ea1ec10167985519fccede4d5fc7-1678293caad&queryTimeType=99&startTime=1544083968 You can visit the following link to view the alert details: ${FullResultUrl}.
Results The information of an alert rule evaluation. This variable is of the array type. For more information, see Fields in alert rule evaluation logs.
Note If an alert involves more than evaluation results, only the first 100 evaluation results can be referenced.
[
  {
    "EndTime": 1542507580,
    "FireResult": {
      "__time__": "1542453580",
      "count": "0"
    },
    "LogStore": "test-logstore",
    "Query": "* | SELECT COUNT(*) as count",
    "RawResultCount": 1,
    "RawResults": [
      {
        "__time__": "1542453580",
        "count": "0"
      }
    ],
    "StartTime": 1542453580
  }
]
The query time range of the first query statement is from ${Results[0].StartTime} to ${Results[0].EndTime}. The value of the count field is ${Results[0].FireResult.count} times.
Note In this example, 0 indicates the serial number of a query statement. The serial number of a query statement is the same as the serial number of the chart that plots the result of the query statement. For more information, see How can I view the serial number of a chart?