Enable Logs
Access logs can help you understand the behavior and regional distribution of clients, and provide access path information to help troubleshoot faults.
1, Only CLB of request proxy type supports log function.
2, Log management itself does not charge fees, but logs need to be stored in US3 and the corresponding usage fees need to be paid. US3 Product Price
3, Enabling logs will result in a 10% performance loss.
Operation Steps
1, Click on the CLB name or details on the CLB list page to go to the instance details page.
2, On the CLB overview page, click the edit icon behind log management in the basic information module to enable access log.
3, Select the US3 storage space and token for storing logs, and click confirm.
Logs need to be stored in the local region US3 storage space, so it is necessary to enable US3 permissions first and create storage space in the region where the CLB instance is located.
A log file is generated every 5 minutes and stored in the selected storage space.
Log Parsing
HTTP/HTTPS Protocol Log
Intranet CLB
192.168.5.198 - - [24/Feb/2021:17:33:21 +0800] 200 5068 18070 192.168.5.208:8080 "" "curl/7.29.0" - - 192.168.5.30:80 2 ms 3 ms "GET / HTTP/1.1"
Client ip -- [Local time] Status code Server returns the byte size of the client Client port IP of the CLB:Port of the CLB "http_referer"(If not, "" or "-") "http_user_agent"(If not, "" or "-") ssl_version(If not, -) ssl_ciphers(If not, -) IP of rs service:port of rs service Response time Request time "request"
Internet CLB
There are two formats for the Internet, the difference lies in the IP of rs service and the port of rs service.
Format one:
117.50.92.198 - - [24/Feb/2021:18:19:19 +0800] 200 5068 35504 117.50.92.208:443 "" "curl/7.29.0" TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 rs_192.168.5.30:80_670054 2 ms 3 ms "GET / HTTP/1.1"
Client ip -- [Local time] Status code Server returns the byte size of the client Client port IP of the CLB:Port of the CLB "http_referer"(If not, "" or "-") "http_user_agent"(If not, "" or "-") ssl_version(If not, -) ssl_ciphers(If not, -) Name of rs(rs_rs service IP:rs service port_ID) Response time Request time "request"
Format two:
117.50.92.198 - - [24/Feb/2021:18:19:19 +0800] 200 5068 35504 117.50.92.208:443 "" "curl/7.29.0" TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 192.168.5.30:80 2 ms 3 ms "GET / HTTP/1.1"
Client ip -- [Local time] Status code Server returns the byte size of the client Client port IP of the CLB:Port of the CLB "http_referer"(If not, "" or "-") "http_user_agent"(If not, "" or "-") ssl_version(If not, -) ssl_ciphers(If not, -) IP of rs service:port of rs service Response time Request time "request"
TCP Protocol Log
Intranet CLB
192.168.5.198 - - [25/Feb/2021:11:52:38 +0800] 5073 45508 192.168.5.238:80 192.168.5.30:80
Client ip -- [Local time] Server returns the byte size of the client Client port IP of the CLB:Port of the CLB IP of rs service:port of rs service
Internet CLB
There are two formats for the Internet, the difference lies in the IP of the CLB and the port of the CLB as well as the IP of rs service and the port of rs service.
Format one:
117.50.92.198 - - [25/Feb/2021:11:52:38 +0800] 5073 45508 FE_106.75.33.238:80 rs_192.168.5.30:80_665936
Client ip -- [Local time] Server returns the byte size of the client Client port Service name(FE_Service IP:Service port) Name of rs(rs_rs service IP:rs service port_ID)
Format two:
117.50.92.198 - - [25/Feb/2021:11:52:38 +0800] 5073 45508 106.75.33.238:80 192.168.5.30:80
Client ip -- [Local time] Server returns the byte size of the client Client port IP of the CLB:Port of the CLB IP of rs service:port of rs service