tencent cloud

Feedback

Configuring Health Check Logs

Last updated: 2024-01-04 14:34:05
    CLB supports storing health check logs to CLS where you can view the logs, reporting at a minute granularity and querying online by multiple rules, helping you identify the causes of health check failures.
    Note:
    The feature is in a beta test. To try it out, submit a ticket.
    Health check logging includes log reporting, storage and query:
    Log reporting: Service forwarding has a higher priority than log reporting.
    Log storage and query: SLA is guaranteed based on the storage service currently in use.

    Restrictions

    CLB layer-4 and layer-7 protocols can be used for storing health check logs to CLS.
    Storing CLB health check logs to CLS is now free of charge. You only need to pay for the CLS service.
    This feature is available only to CLB (formerly known as application CLB) instances.
    This feature is supported only in certain regions as displayed in the console.

    Step 1: Add a Role Permission

    To add a role permission, make sure you have activated the CLS service.
    1. Log in to the CLB console and click Health Check Logs in the left sidebar.
    2. On the Health Check Logs page, click Activate now, and then click Authorize and Activate in the pop-up window.
    3. Switch to the Role Management page in the CAM console, and click Grant.

    Step 2: Create a Logset and Log Topic

    To store health check logs to CLS, you need to first create a logset and log topic. If you have created a logset and log topic, skip to Step 3.
    1. Log in to the CLB console and click Health Check Logs in the left sidebar.
    2. On the Health Check Logs page, select a region for the logset, and then click Create Logset in the Logset information section.
    3. In the pop-up Create Logset window, set the retention period and click Save.
    4. Click Create Log Topic in the Log Topic section of the Health Check Logs page.
    5. In the pop-up window, specify the storage type and log retention period, select a CLB instance in the list on the left and add it to the list on the right, and then click Save.
    Note:
    Supported storage types: STANDARD storage and IA storage. For more information, see Storage Class Overview.
    Logs can be retained permanently or for a specified period of time.
    When you create a log topic, you can add a CLB instance as needed. To add a CLB instance after a log topic is created, click Manage in the Operation column of the log topic in the list. Each CLB instance can be added to only one log topic.
    A logset can contain multiple log topics. You can categorize CLB logs into various log topics which will be marked with "CLB" by default.
    6. (Optional) To disable health check logging, click Disable.

    Step 3. View Health Check Logs

    Without any manual configurations, CLB has been automatically configured with index search by health check log valuable. You can directly query health check logs through search and analysis.
    1. Log in to the CLB console and click Health Check Logs in the left sidebar.
    2. On the Health Check Logs page, select the region of the logset you want to view. In the Log Topic section, click Search in the Operation column of the log topic you select to go to the CLS Console.
    3. In the CLS console, click Search Analysis in the left sidebar.
    4. On the Search Analysis page, enter the search syntax in the input box, select a time range, and then click Search Analysis to search for health check logs reported by CLB to CLS.
    Note:
    For more information about the search syntax, see Syntax Rules.

    Health Check Log Format and Variable

    Log format

    [$protocol][$rsport][$rs_vpcid][$vport][$vpcid][$time][$vip][$rsip][$status][$domain][$url]

    Log variable description

    Variable Name
    Description
    Field Type
    protocol
    Protocol type. Supported protocols: HTTP, HTTPS, SPDY, HTTP2, WS, and WSS.
    text
    rsport
    Port of the real server.
    long
    rs_vpcid
    VPC ID of the real server. The vip_vpcid value of a public network CLB instance is -1.
    long
    vport
    CLB VPort, that is, the listening port.
    long
    vpcId
    VPC ID of the VIP of the CLB instance. The vip_vpcid value of a public network CLB instance is -1.
    long
    time
    Access time and time zone. Example: 01/Jul/2019:11:11:00 +0800, where +0800 represents UTC+8.
    text
    vip
    VIP of the CLB instance.
    text
    rsip
    IP address of the real server.
    text
    status
    Health status. Valid values:
    true: healthy
    false: unhealthy
    text
    domain
    Domain name to be checked. This parameter is left empty if a layer-4 listener is used.
    text
    url
    URL to be checked. This parameter is left empty if a layer-4 listener is used.
    text

    References

    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