You can create message templates to customize notifications. When a preset notification rule is triggered, notifications can be sent to specified personnel by emails, SMS, voice calls, HTTP, or HTTPS. If no message template is created, the default message template will be used.
Variable |
Description |
Definition |
|---|---|---|
OTC account |
Account used to log in to the management console. |
${domain_name} |
Notification Type |
Type selected when a notification rule is created, which can be Alarm or Event. |
${event_type} |
Severity |
Alarm or event severity, which can be Critical, Major, Minor, or Warning. |
${event_severity} |
Name |
Name of the alarm or event that triggers the notification rule. |
$event.metadata.event_name |
Occurred |
Time when the alarm or event is triggered. |
${starts_at} |
Source |
Name of the service corresponding to the alarm or event that triggers the notification rule. |
$event.metadata.resource_provider |
Resource Type |
Type of the resource selected when you customize a threshold rule or define alarm reporting. |
$event.metadata.resource_type |
Resource Identifier |
Resource that triggers the alarm or event. |
${resources} |
Custom tag |
Extended tag. |
$event.metadata.key1 |
Possible Cause |
Cause of the alarm. For non-custom reporting, "NA" is displayed. |
${alarm_probableCause_zh} |
Additional Info |
Additional alarm description, such as the metric name and alarm rule status change. |
${message} |
Suggestion |
Suggestion on how to handle the alarm. For non-custom reporting, "NA" is displayed. |
${alarm_fix_suggestion_zh} |
Custom annotation |
Extended annotation. |
$event.annotations.key2 |
{
"event": {
"starts_at": 1579420868000, //${starts_at}
"ends_at": 1579420868000,
"timeout": 60000,
"resource_group_id": "5680587ab6*******755c543c1f",
"metadata": {
"event_name": "test", //${metadata.event_name}
"event_severity": "Major", //${metadata.event_severity}
"event_type": "alarm", //${metadata.event_type}
"resource_provider": "ecs", //${metadata.resource_provider}
"resource_type": "vm", //${metadata.resource_type}
"resource_id": "ecs123",
"key1": "Custom field" //$event.metadata.key1
},
"annotations": {
"alarm_probableCause_zh_cn": "possible cause", //${annotations.alarm_probableCause_zh}
"alarm_fix_suggestion_zh_cn": "fix suggestion", //${annotations.alarm_fix_suggestion_zh}
"key2": "Custom field" //$event.annotations.key2
}
}
}
After creating a message template, you can perform the operations listed in Table 2.
Operation |
Description |
|---|---|
Editing a message template |
Click Edit in the Operation column. |
Copying a message template |
Click Copy in the Operation column. |
Deleting a message template |
|
Searching for a message template |
Enter a template name in the search box in the upper right corner and click |