You can send alert messages through email and view alert messages by using an email client.
Prerequisites
Make sure that you have the following permissions:
-
Resource Permissions : Cluster Read-only, Tenant Read-only, OBProxy Read-only, Arbitration Service Read-only, Binlog Service Read-only, or Host Read-only permission -
Menu Permissions : Permission on theAll menu of theAlert Center
-
You have obtained the port of the Simple Mail Transfer Protocol (SMTP) service. The default port is 25 or 465, depending on the environment. Transport Layer Security (TLS) is disabled when port 25 is used, and is enabled when port 465 is used.
You have obtained the username and password of the email address from which the alert messages will be sent, which are required by some systems.
Considerations
- OCP of a version earlier than V4.2.0 does not support sending alert messages to multiple email addresses.
- In OCP of a version earlier than V4.2.0, if port 465 is used with TLS enabled, alert messages will fail to be sent. In this case, you must use port 25 without enabling TLS, or upgrade OCP to a version later than V4.2.0.
Procedure
In the left-side navigation pane, choose
Alert Center .On the alert details page, click the
Alert Channel tab.On the
Alert Channel tab, clickCreate Channel .Configure the email alert channel.
Basic settings
Parameter Required? Description Channel Type Yes Select Email from the drop-down list. Channel Name Yes The name of the channel for identification. Recipient Email Address Yes The email address used to receive alert messages. Channel settings
Parameter Required? Description SMTP Server Yes The address of the STMP server, for example, stmp.163.com.Port Yes The STMP service port. TLS is disabled when port 25 is used, and is enabled when port 465 is used. The default port is 25 or 465, depending on the environment. Enable TLS Yes Specifies whether to enable the TLS protocol. Username Yes The username of the email address used to send alert messages. Other accounts can also be used. Password Yes The password of the email address used to send alert messages. Sender Email Address Yes The email address used to send alert messages. You can change it as needed. Message settings
The default message format is text in OceanBase Cloud of a version earlier than V4.2.1, and it is in Markdown format since OceanBase Cloud V4.2.1.
You can modify the message structure. Here is a sample of the message structure of the default format:
Set
Alert Message Format toMarkdown. You can enter${}to introduce a variable.### OCP alert notification ${alarm_name} - Level: ${alarm_level} - Alert object: ${alarm_target} - Summary: ${alarm_summary} - Generation time: ${alarm_active_at} - Description: ${alarm_description} - OCP link: ${alarm_url}
You can use other features.
Alert message aggregate: You can enable the channel aggregate feature to avoid repeatedly sending the same alert within a period. Since OCP V4.1.0, an alert is generated every 3 minutes by default. After you enable channel aggregate, an alert is sent only once every 10 minutes (600 seconds).
Click
Submit .