TDSQL-C for MySQL supports the event alarming feature. After you set an event rule, target, and recipient, if this feature detects an abnormal event, it will send alarm notifications to the recipient through various channels. This document describes how to set an event alarm.
Step 1. Activate EventBridge
EventBridge uses CAM to manage permissions. CAM is a permission and access management service that helps you securely manage the access permissions of resources under your Tencent Cloud account. With CAM, you can create, manage, and terminate users and user groups and use identity and policy management to control user access to Tencent Cloud resources. To use EventBridge with a root account or sub-account, you need to activate it first as instructed in Activating EventBridge. Step 2. Configure event alarm push for TDSQL-C for MySQL
After activating EventBridge, you need to select the event source connection method. Currently, you can select TDSQL-C for MySQL monitoring events as an event source.
Note:
Ops events generated in TDSQL-C for MySQL such as alarms and audits will all be published to the Tencent Cloud service event bus by default, which cannot be changed or edited.
After EventBridge is activated, it will automatically create a default Tencent Cloud service event bus in Guangzhou region, to which alarm events (monitoring and audit events) generated by TDSQL-C for MySQL will be automatically published.
2. Select the Guangzhou region at the top.
3. Click the default event bus below Tencent Cloud Service Event Bus.
4. On the default event bus details page, click Manage Event Rules.
5. On the page redirected to, click Create.
6. On the Create event rule page, set the following configuration items and click Next.
|
Rule name | Enter the rule name, which can contain 2–60 letters, digits, underscores, and hyphens. It must start with a letter and end with a digit or letter. |
Rule description | Enter the rule description, which can contain up to 200 digits, letters, and symbols. |
Tag | Select whether to enable tag. After tag is enabled, you can add tags to the event rule. |
Data conversion | Data conversion processes the content of the event (extracting, parsing, and re-mapping fields) before the event is published to the target. |
Sample event | A sample event structure is provided as a reference for configuring the event match rule. You can find the target template below. |
Write mode | Form mode (recommended) and custom event are supported. |
Tencent Cloud service | Select TDSQL-C for MySQL. |
Event type | |
Test match rule | Select the event type template selected in Sample event and click Test match rule. If the test is passed, proceed to the next step. |
Note:
To receive events from the specified instance, configure the following rule:
{
"source":"cynosdb_mysql.cloud.tencent",
"subject":"ins-xxxxxx"
}
This rule indicates to receive and publish events of the TDSQL-C for MySQL instance ins-XXX
only. Other events will be discarded.
You can also specify multiple resources by using an array.
{
"source":"cynosdb_mysql.cloud.tencent",
"subject":["ins-xxxxxx","ins-xxxxxx"]
}
7. On the Delivery target tab, set the following configuration items, select Enable event rules now and click Complete.
|
Trigger method | Select Notification message. |
Message template | You can select Monitoring alert template or General notification template. |
Alarm content | You can select Chinese or English. |
Notification method | You can select API callback, Publishing channel, or All methods. Here, Publishing channel is selected for subsequent settings. |
Recipients | Select users or user groups to receive notifications. |
Notification period | Customize the time period for receiving notifications. |
Delivery method | Select one or multiple delivery methods. An SMS message can contain up to 500 characters, and a phone call can contain up to 350 characters in the script. Events with excessive characters (probably caused by long instance names) won't be pushed. We recommend that you configure multiple methods. |
Note:
To configure multiple event targets, click Add.
8. After successful creation, you can query and manage the event rule in the event rule list.
Was this page helpful?