tencent cloud

Feedback

Creating Event Rule

Last updated: 2024-11-05 10:18:19

    Overview

    TencentDB for Redis® has been connected to TCOP to report cloud monitoring events. All events will be automatically delivered to the Event Bus in EventBridge.

    TCOP events

    Currently, the following TCOP events can be reported:
    Event
    Name
    Event Type
    Dimension
    Recoverable
    Description
    Solution and Suggestion
    Master/Replica switch
    MasterSlaveSwitched
    Status change
    TencentDB for Redis® instance
    No
    A failover occurs in TencentDB for Redis®.
    The failure will cause the TencentDB for Redis® service to become inaccessible and momentarily unavailable. Make sure that your business has an automatic reconnection mechanism for quick business recovery.
    Service unavailability
    ServiceNotAvailable
    Errors
    TencentDB for Redis® instance
    Charged
    The TencentDB for Redis® service is unavailable due to a failure.
    We will recover the service as soon as possible and send a service recovery notification. If you have a disaster recovery instance, try switching your business to it.
    Read-only replica failover
    ReadonlyReplicaSwitched
    Status change
    TencentDB for Redis® instance
    Charged
    A failover occurs in the TencentDB for Redis® read-only replica.
    We will recover the service as soon as possible and send a service recovery notification. If you have a disaster recovery instance, try switching your business to it. You can also add more read-only replicas.
    Unavailable read-only replica
    ReadonlyReplicaNotAvailable
    Errors
    TencentDB for Redis® instance
    Charged
    A failure occurs in the TencentDB for Redis® read-only replica.
    We will recover the service as soon as possible and send a service recovery notification. If you have a disaster recovery instance, try switching your business to it. You can also add more read-only replicas.
    Instance migration caused by server failure
    ServerfailureInstanceMigration
    Status change
    TencentDB for Redis® instance
    Charged
    A server error occurs in TencentDB for Redis®.
    The system detects that there is a hardware risk on the server and automatically performs a switch. The switch time is subject to the maintenance time. To change the time, do it promptly.

    Event target

    An event rule can have multiple event targets. Before creating an event rule, plan the event target types first. Currently, EventBridge supports the following event targets.
    Message Push Target (supported by rules only in the Tencent Cloud service event bus)

    Billing Details

    EventBridge is pay-as-you-go. For more information, see Product Pricing.
    Type
    Pay-as-you-go
    Payment Method
    Fees are charged hourly by the number of events actually delivered to the event bus.
    Billing Unit
    USD/million events
    Use Cases
    Low or fluctuating message volumes

    Directions

    1. Log in to the EventBridge console and select Event rule on the left sidebar.
    2. At the top of the page on the right, select Guangzhou for Region and select default in the Event Bus drop-down list.
    The Tencent Cloud service event bus collects monitoring and audit events generated by Tencent Cloud services in all regions. It is created in Guangzhou region by default and cannot be deleted.
    Select Event Bus on the left sidebar. In the event bus list, click default, and you can see that the default event bus already contains TencentDB for Redis®. For detailed directions, see Tencent Cloud Service Event Source.
    3. Click Create. On the Event Pattern page, configure parameters by referring to the following descriptions:
    Section
    Field
    Description
    Basic info
    Region
    The region where to create an event rule.
    Event Bus
    Information of the event bus to which the event rule belongs.
    Rule Name
    Event 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
    Brief description of the event rule.
    Tag
    Tag key and value of the event.
    Data conversion
    Choose whether data conversion is required.
    Sample event
    Sample event
    In the drop-down list, search for Redis to view sample events of Redis.
    Event matching
    Write mode
    Form mode: In this mode, you can select Tencent Cloud service and Event type to see the event matching rule.
    Custom events: Customize the event matching rule.
    Cloud Services Type
    This parameter will be displayed if Form mode is selected for Write mode. In the drop-down list, select TencentDB for Redis®.
    Event Type
    This parameter will be displayed if Form mode is selected for Write mode. In the drop-down list, select the supported event type.
    Event matching rule preview
    Preview the generated event matching rule.
    4. Click Test matching rule to test the defined event matching rule.
    5. (Optional) To convert the data format, enter the event transformation page. Configure the data conversion formats and fields according to the parameter descriptions in the following table and click OK to start parsing the data. After data parsing is completed, set the filter rule and data processing method. For detailed directions, see Configuring Data Conversion.
    Note:
    EventBridge provides simple data processing capabilities. After you pass in data and configuration items to EventBridge, EventBridge formats the data and distributes the structured data obtained after processing to downstream targets, creating a bridge between data sources and data processing systems.
    
    Field
    Description
    Rule pattern preview
    If you select Sample event, you can use an event template. If you select Manually input, you can customize the event fields in the input box below.
    Event template
    This parameter will be displayed if Sample event is selected for Rule pattern preview. You can search for "Redis" in the drop-down list and select the TencentDB for Redis® event template. Then, the specific field information of the event template will be displayed in the input box below.
    Target
    All events: The complete structure of event fields will be routed to the delivery target.
    Specified events: EventBridge will extract event parameters according to the event fields configured in JSONPath to route the specified event fields to the delivery target.
    JSONPath
    This parameter will be displayed if Specified events is selected for Target. Enter the event fields to be converted in the input box.
    Parsing mode
    Select a parsing mode, which can be JSON, Separator, or Extract with regex.
    6. Click Next to select the delivery target bound to the rule. You can deliver collected events to the specified target to process and consume them. In the figure below, Notification message is selected for Trigger method as an example.
    
    7. To make the event rule take effect immediately, select Enable event rules now and click Complete.

    Event Rule APIs

    API
    Description
    Checks a rule
    Creates an event rule
    Deletes an event rule
    Gets the details of an event rule
    Gets the list of event rules
    Updates an event rule

    More operations

    You can view, modify, or delete an event rule. For more information, see Managing Event Rule.

    FAQs

    For questions about event rule concepts and billing, see Concept.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support