tencent cloud

Feedback

Creating Event Rule

Last updated: 2023-03-21 16:17:39

    Overview

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

    CM event

    Currently, the following 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.
    Unavailable service
    ServiceNotAvailable
    Exception
    TencentDB for Redis instance
    Yes
    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
    Yes
    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
    Exception
    TencentDB for Redis instance
    Yes
    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
    Yes
    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 Overview

    EventBridge is pay-as-you-go. For more information, see Product Pricing.
    Type
    Pay-as-You-Go
    Payment mode
    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
    Parameter
    Description
    Basic information
    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.
    Tencent Cloud service
    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.
    Notes
    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.
    
    Parameter
    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
    CheckRule
    Checks a rule
    Creates an event rule
    Deletes an event rule
    GetRule
    Gets the details of an event rule
    ListRules
    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