After you enable layer-7 access logging or health check logging, if the log volume is large, full log reporting may result in high log costs. Tencent Cloud Load Balancer (CLB) supports log collection through sampling to reduce the amount of reported data and reduce log costs.
Note:
You can configure to store CLB access logs and health check logs in Tencent Cloud Log Service (CLS) to achieve log search, analysis, visualization, and alarming. CLS is separately billed. For more information about the billing of CLS, see Product Pricing. Prerequisites
Sampling Layer-7 Access Logs
1. Log in to the CLB console and choose Access logs > Log list in the left sidebar. 2. In the top-left corner of the Access logs page, select your region. Find the target log topic in the log topic list and choose More > Sample in the Operation column.
3. In the Sample CLB logs pop-up window, turn on the sampling switch and configure the parameters as needed.
|
Sample | If the switch is turned on, log sampling is enabled. If the switch is turned off, full logs are collected. |
Default ratio | If you configured the log sampling rule, logs that do not match the sampling rule are sampled based on the default sampling ratio. You can enter an integer from 1 to 100. |
Sampling field | The status field is currently supported. |
Sampling rule | Sampling rules support regular expressions. For example, if you want to sample logs whose status code is 400 or 500, you can set the sampling rule as to 400|500. |
Sampling ratio | Sampling ratio. You can enter an integer from 1 to 100. |
Operation | You can delete the sampling rule. |
Add | If the existing sampling rules do not meet your needs, you can add more sampling rules. At most five sampling rules can be configured for each log topic. |
4. Click Submit to return to the log topic list page. If log sampling is enabled for a log topic, the word Sampling is displayed next to the topic name.
Sampling Health Check Logs
1. Log in to the CLB console and click Health Check Logs in the left sidebar. References
Was this page helpful?