tencent cloud

Feedback

Configuring Health Check Logs

Last updated: 2022-08-10 17:25:28

    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

    Health check logging is currently available to beta users. To use this service, please submit a ticket.

    Health check logging includes log reporting, storage and query:

    • Log reporting: Processes service forwarding first, and then log reporting.
    • Log storage and query: Provides SLA support 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 only available to application CLBs.
    • Only IPv4 and IPv6 NAT64 CLB instances support health check logging.
    • This feature is only supported in CLS available regions. See Available Regions.

    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 select Health Check Logs on the left sidebar.
    2. On the Health Check Logs page, click Activate Now. Click Authorize and Activate in the pop-up dialog box.
    3. Switch to the Role Management page on the CAM console, and click Grant.

    Step 2. Create Logsets and Log Topics

    To store health check logs to CLS, you need to first create a logset and log topic.
    You can directly jump to Step 3 if you have created a logset and log topic.

    1. Log in to the CLB Console and select Health Check Logs on 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 dialog box, 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, select a CLB instance to add to the list on the right, and then click Save.
      Note:

      When creating a log topic, you can add a CLB instance as needed. To add one, select a log topic in the list and click Manage in the operation column. Each CLB instance can only be added to one log topic.

    6. (Optional) To disable health check logging, just 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 select Health Check Logs on 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 on the right of the log topic you select to switch to the CLS console.
    3. On the CLS console, click Search Analysis on 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:

      See Syntax and Rules for more information on search syntax.

    Health Check Log Format and Variable

    Log format

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

    Log variable description

    Field Type

    VariableDescription
    protocol Protocol type(HTTP/HTTPS/SPDY/HTTP2/WS/WSS).text
    rsportReal server port.long
    rs_vpcidVPC ID of a real server; the `vip_vpcid` of a public network CLB instance is `-1`.long
    vportCLB VPort, i.e., the listening port.long
    vpcidVPC ID of a CLB VIP; the `vip_vpcid` of a public network CLB instance is `-1`.long
    time Access time and time zone, such as "01/Jul/2019:11:11:00 +0800" where "+0800" represents UTC+8, i.e., Beijing time.text
    vipCLB VIP. text
    rsipReal server IP.text
    statusHealth check status.
    • `true`: healthy
    • `false`: unhealthy
    text
    domainDomain name to be checked. This parameter is left empty if a layer-4 listener is used.text
    urlURL to be checked. This parameter is left empty if a layer-4 listener is used.text

    References

    Getting Started in 5 Minutes

    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