You can create a notification template to quickly set alert rules for business targets in batches.
Procedure
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Alerts.
Enter the Alert Management page and click the Alert Notification Templates tab.
On the Alert Notification Template tab, click Create Notification Template.
Configure the following template rules.
Parameter Description Template Name Specifies the name of the alert notification template. Notification Method Specify the alert notification method. Supports email, DingTalk, Lark, Telegram, and custom webhooks. Alert Target Type Select the alert target as Instance or Tenant. Notification Effective Period The start and end times of the effective period must be on the same day and the start time must be earlier than the end time. If you do not specify the effective period, the alert rule takes effect 24 hours a day. Alert Notification Template Title The title displayed in alert notifications, with a maximum length of 50 characters. Exceeding characters will be truncated. You can use the ${alertName}format to input variables, where alertName represents the alert name.Note
The maximum length of 50 characters also applies to the parsed content of the input variables.
Alert Notification Template Content The content displayed in an alert notification. The maximum length of the content is 500 characters. Any excess will be truncated. You can enter variables in the format of ${alertName}, where alertName represents the name of the alert. For more information about the supported variables, see Alert variables.Note
The maximum length of 500 characters also applies to the parsed content of the input variables.
Alert Resolution Notification Template Title The title displayed in alert resolution notifications. The title can contain up to 50 characters, and any excess will be truncated. You can use the ${alertName}format to input variables, where alertName represents the alert name.Note
The maximum length of 50 characters also applies to the parsed content of the input variables.
Alert Resolution Notification Template Content The content displayed in the alert resolution notification. The maximum length of the content is 500 characters. Any text exceeding 500 characters will be truncated. You can enter variables in the format of ${alertName}, where alertName represents the name of the alert. For more information about the supported variables, see Alert variables.Note
The maximum length of 500 characters also applies to the parsed content of the input variables.
Click Create.
Alert variables
The following variables are supported in alert notifications:
| Variable | Description |
|---|---|
| alarmHistoryDetailUrl | The link to the alert. |
| alertName | The name of the alert. |
| region | The region where the instance is located. |
| alertType | The type of the alert object. |
| metricName | The name of the alert metric. |
| startTime | The time when the alert was triggered. |
| closeTime | The time when the alert was resolved. |
| resourceDetail | The description of the alert object in plain text. |
| resourceInfo | The description of the alert object, which may contain unescaped characters. |
| instanceId | The ID of the instance. |
| obInstanceId | The ID of the node. |
| instanceName | The name of the instance. |
| obTenantId | The ID of the OceanBase tenant. |
| obTenantName | The name of the OceanBase tenant. |
| values | The monitoring values. |