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
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 generated by TDSQL-C for MySQL will be automatically published.
Method 1: Configuring the Event Bus
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. Upon navigating to the designated page, click Create (this instruction uses the creation of a new event rule as an example; if an event rule already exists, it can be directly modified without the need for recreation).
5. 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. |
Event sample | A sample event structure is provided as a reference for configuring the event match rule. You can find the target template below. Select the cloud service type: TDSQL-C for MySQL. |
Mode | Form mode (recommended) and custom event are supported. |
Tencent Cloud service | Select TDSQL-C for MySQL. |
Event Type | Select one or multiple alarm event types. |
Subject to match | Select the matching object for event alarms, with options to choose all instances or specify target instances. |
6. On the Event Target page, complete the relevant settings, check Enable event rules now, and click Complete. (There are various trigger methods available, and you can choose as needed. The following figure takes "Message Push" as an example for the trigger method. Channel Push will be sent to the designated contacts. Recipients must be set individually at Recipient, and the Notification Period should be confirmed with the Account User. The receiving channels can include Email, message center, SMS, and telephone)
Note:
To configure multiple event targets, click Add.
7. Once the event message push is set up, if the configured event alarm information occurs, the system will notify through the receiving channels you set for the recipients.
Method 2: TCOP Alarm Policy Configuration
Create an alarm policy
1. log in to the TCOP Console, and select Alert Management > Alarm Policy in the left navigation bar. 2. On the Alarm Policy List Page, click Create Policy.
3. On the Policy Creation page, complete the settings for basic information, alarm rules, and alarm notifications.
Policy Type: Divided into host monitoring and standby machine monitoring, each applicable to different types of instances.
Alarm Object: The object instance can be found by selecting the region where the object is located or searching for the instance ID of the object.
Trigger Condition: Find the event alarm, click Add Event, and add alarm events as needed for your business.
Configuring Alarm Notification: Supports choosing system preset notification templates and user-defined notification templates, with each alarm policy being able to be bound to a maximum of three notification templates. For user-defined notification templates, see Create New Notification Template. Select system preset templates
Creating a template
4. After confirming there are no errors, click Complete.
Associate Alarm Objects
After creating an alarm policy, you can also associate it with other alarm objects (other instances that require this alarm policy). An alarm will be sent when the object meets the alarm trigger condition.
2. In the Alarm Object column on the Manage Alarm Policy page, click Add Object.
3. In the pop-up dialog box, select the alarm object you need to associate, and click OK to associate the alarm object.
Was this page helpful?