tencent cloud

Feedback

Last updated: 2024-03-07 09:38:49
    TencentDB for CynosDB provides the Cloud Log Service (CLS) feature to gather slow log data stemming from TencentDB for CynosDB instances. This data is subsequently shipped to CLS for thorough analysis, which encompasses everything from log gathering and storage to log search, facilitating rapid monitoring and problem identification in the business operations. This article outlines the process of enabling or disabling the CLS feature through the console.
    Note:
    This service is in the process of a phased rollout. If the region of your instance currently does not support CLS, please submit a ticket to provide feedback.

    Prerequisites

    Before using this feature, please ensure that you have enabled CLS.

    Definition of Slow Log

    Field Value
    Type
    Description
    TIMESTAMP
    -
    Reserved field of CLS, signifying the generation time of the log.
    instance_id
    String
    Database instance ID, such as cynosdbmysql-ins-xxxx.
    db_name
    String
    Database name.
    rows_examined
    Long
    Number of scanned rows.
    rows_sent
    Long
    Number of returned rows.
    query_time
    Double
    Execution time (in seconds).
    lock_time
    Double
    Lock waiting time (in seconds).
    user_host
    String
    Client information.
    user_name
    String
    The username employed in client connection to the database instance.
    query_sql
    String
    Slow log SQL.

    Enabling CLS

    1. In the console, proceed to the cluster operation log page according to the actually used view pattern.
    Tab View
    List View
    1. Log in to the TencentDB for CynosDB console, locate the cluster list on the left, and click the target cluster to enter the cluster management page.
    2. On the cluster management page, select the Operation Log page.
    
    1. Log in to the TencentDB for CynosDB console, select the appropriate region at the top, locate your desired cluster, and click the Cluster ID or Manage in the Operation column. This will lead you to the cluster management page.
    2. On the cluster management page, select the Operation Log page.
    
    2. On the operation log page, select the instance that needs to enable the slow log shipping service, and then click Slow Log Details > CLS (Activate Service).
    
    3. Within the Enable Shipping Service pop-up window, click Enable Now to authorize the TDSQL-C service role (if you have already authorized, you can skip Steps 3 to 5).
    
    4. On the page redirected to Role Management, click Grant.
    
    5. Return to the pop-up window of Enable Shipping Service, read and check the Step, then click Start Using.
    6. Click on
    Add shipping logset
    to conduct log shipping configuration.
    7. Complete the following configuration in the pop-up window, then click Activate Now.
    Parameter
    Description
    Region
    Select the region for the logset shipping.
    Logset operation
    Logsets categorize log topics for your convenience in management. You can choose existing logsets or create new ones.
    Logset
    Select an existing logset: Filter through the search box to choose an existing logset for categorizing slow log shipping.
    Create a logset: You can create a new logset for the classification of slow log shipping, entering the name in the cloud_cynos_custom_logset format. The customised part only supports English alphabets, numbers, underscores, and hyphens.
    Log topic operation
    Log topic is the fundamental cell for log data collection, storage, retrieval and analysis. An existing log topic can be selected, or a new one can be created.
    Log topic
    Select an existing log topic: Only when the log set operation selects an existing log set, can this option be set. You may filter log topics under the selected log set in the search box.
    Create a log topic: Create a new log topic under the selected log set, the naming format for creating a log topic is cloud_cynos_custom_topic, where the custom part only supports English letters, numbers, underscores, and hyphens.
    8. Once the CLS is successfully enabled, you can see the created Logset/ Log Topic in the log configuration pop-up window. Click Go to CLS to jump to the Cloud Log Service console for subsequent analysis and management.
    Note:
    Currently, when log shipping is initiated upon CLS is enabled, the index feature is not enabled by default. However, index configuration is a prerequisite for using CLS for search and analysis. A log can only be subjected to search and analysis if index is enabled. To activate the index feature, please refer to index configuration (CLS).

    Disabling CLS

    Note:
    Upon disabling, log shipping to corresponding topics will cease. Though, shipped logs will be retained. If you want to delete logs, please proceed to the CLS console for deletion.
    1. Refer to Enabling CLS > Step 1 to access the log operation page.
    2. On the operation log page, select the instance that needs to disable the slow log shipping service, then click Slow Log Details > CLS (Activate Service).
    3. In the log configuration pop-up window, find the target logset/log topic, then click Disable.
    4. In the pop-up window, click OK.

    Feature Description of Log Configuration Page

    Feature
    Description
    Enabled
    Re-enable an existing log shipping configuration (currently disabled), and ship logs to CLS again. During this period, the log storage fees will be continuously charged.
    Delete
    Delete an existing log shipping configuration (currently disabled). However, historical logs will continue to be stored in the log topics until they expire. During this period, and the log storage fees will be continuously charged. If you do not want to continue storing historical logs, you may visit the CLS console to delete the log topics.
    Add shipping logset
    Create a new shipping logset. For operation steps, refer to Enabling CLS > Steps 6 to 8.

    Documentation

    Logset
    Dashboard
    
    
    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