An SNS text template is a text template that is used when an alarm or
event sends messages to an SNS topic.
The Cloud contains a default template of an alarm message and a recovered
message. If you do not create a template, the Cloud will use the default
template.
You can create multiple message templates, but can only default one template.
Specifically, when messages are sent, the default formatted message will be
used.
With ${}, you can use variables provided by an alarm or event
in the template.
Currently, an SNS text template supports four types of endpoint platform: email,
DingTalk, Microsoft Teams, and short message service. If you use an SNS text
template, formatted alarm messages will be sent to you via email, DingTalk,
Microsoft Teams, or short messages.
Create SNS Text Template
In the navigation pane of the ZStack Private Cloud UI, choose Platform O&M > ZWatch > SNS Text Template. On the SNS Text Template page, click
Create SNS Text Template. On the displayed
Create SNS Text Template page, set the following
parameters:
Name: Enter a name for the SNS text template.
Description: Optional. Enter a description for the
SNS text template.
Platform Type: Select an endpoint platform type.
Currently, an SNS text template supports four types of endpoint platform:
email, DingTalk, Microsoft Teams, and short message service.
Note: If you set an SNS text template in Microsoft Teams, follow
the webhook syntax on the Microsoft Teams official website. For more
information, see the Microsoft Teams official
website.
The following examples are the short message
service template:
Resource
alarm:
Alarm:${ALARM_NAME}, Resource Name:${ALARM_RESOURCE_NAME}, Condition:${ALARM_CONDITION}, Current Value:${ALARM_CURRENT_VALUE}
Note: If you set an alarm message template in short message
service, apply for a third-party SMS signature and a third-party SMS
template in advance. To change the template, complete your
application again on the third party.
Message restoring text: When any resource monitored
by an alarm recovers from the alarm status, alarm recovered messages will be
sent to all platforms that you selected for one time. You can customize
recovered messages texts. An SNS text template in short message does not
support recover messages.
Make default: If selected, the currently created SNS
text template will be set as the default template.
You can create an SNS text template, as shown in Create SNS Text
Template.Figure 1. Create SNS Text Template
SNS Text Template Operations
You can perform the following operations on an SNS text template:
Create: Create an SNS text template.
Make default: Set the SNS text template that you selected as the system
default template.
Cancel Default: Cancel the defaulted SNS text template that you set.
Delete: Delete an SNS text alarm.
Modify name and description: Change a name and description of the SNS text
template.
Modify message content: Change the contents of the alarm message text and
message restoring text.
Audit: Check related operations of this SNS text template.