Server Load Balancer (SLB) can automatically save health check logs generated in three days. If too many health check logs are generated and affect your maintenance, you can reduce health check logs or prevent certain logs from being generated through the following methods.
If you reduce health check logs, SLB faults may be missed. Therefore, we recommend that you consider the risks brought by the following methods and use the methods with caution.
Get access logs
HTTP health checks use the HEAD request method by default. Therefore, you can obtain access logs by filtering out HEAD requests.
Adjust health check frequency
You can increase the interval between two health checks to reduce the health check frequency and generated logs.
Potential risks
After you increase the interval, if a backend ECS instance fails, the time needed for SLB to detect the faulty ECS instance is increased accordingly.
Procedure
Log on to the CLB console.
On the Instances page, click the ID of the CLB instance that you want to manage.
On the Listener tab, find the target listener, and click Modify Listener in the Actions column.
On the Configure Listener page, click Next, then click Next again to go to the Health Check step.
Click Modify and adjust the Health Check Interval. Value range: 1 to 50. Unit: seconds. The greater the interval is, the lower the health check frequency is, and the fewer logs are generated by backend servers. Modify the interval according to your actual situation.
Click Next and click Submit.
Close layer-7 health checks
When layer-7 (HTTP or HTTPS) SLB is used, health checks are performed through HTTP HEAD requests. Application logs of backend servers record the health check requests, leading to a large number of logs.
Potential risks
After you close HTTP/HTTPS health checks, SLB does not check backend servers. If a backend server fails, the traffic cannot be automatically forwarded to other normal backend servers.
Procedure
Log on to the CLB console.
On the Instances page, click the ID of the CLB instance that you want to manage.
Click the Listener tab, find the target listener, and click Modify Listener in the Actions column.
On the Configure Listener page, click Next, then click Next again to go to the Health Check step.
Turn off Health Check.
Click Next and click Submit.
Change layer-7 SLB to layer-4 SLB
Layer-4 health checks are preformed through TCP three-way handshakes and generate no application logs. If you change layer-7 SLB to layer-4 SLB, the number of application logs can be reduced.
Potential risks
After you change the layer-7 SLB to layer-4 SLB, SLB checks only the status of the listener port and does not check the HTTP status. In this way, SLB cannot detect the exceptions occurring to HTTP applications in real time.
Procedure
Log on to the CLB console.
On the Instances page, click the ID of the CLB instance that you want to manage.
On the Listener tab, find the target listener, and click Modify Listener in the Actions column.
On the Configure Listener page, click Next, then click Next again to go to the Health Check step.
Click Modify and change the Health Check Protocol to TCP.
Click Next and click Submit.
Disable application logs on the health check page
You can configure an independent site for health checks and disable application logs of this site. This method can also reduce the number of health checks. For example, the service site is abc.123.com. You can use test.123.com as the health check site and disable logs of test.123.com.
Potential risks
If the health check site is running normally, but an exception occurs to the service site, health checks cannot detect the exception of the service site.
Procedure
Create a new health check site and health check page on the backend server and disable logs. In this example, NGINX is used.

Log on to the CLB console.
On the Instances page, click the ID of the CLB instance that you want to manage.
On the Listener tab, find the target listener, and click Modify Listener in the Actions column.
On the Configure Listener tab, click Next, then click Next again to go to the Health Check step.
Click Modify. In the Health Check Domain Name (Optional) field, enter the domain name of the health check site. In the Health Check Path field, enter the path of the health check page.
Click Next and click Submit.