# 2.16 Ensure Logging is Enabled for HTTP(S) Load Balancer (Automated)

- Source: https://support.icompaas.com/support/solutions/articles/62000233004-216-ensure-logging-is-enabled-for-https-load-balancer-automated
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [GCP Benchmarks](https://support.icompaas.com/support/solutions/62000112667) › [GCP Knowledge Bases](https://support.icompaas.com/support/solutions/folders/62000169178)
- Last updated: 2026-06-16
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

### Profile Applicability:

Level 2

### Description:

Enabling logging for HTTP(S) Load Balancers in Google Cloud Platform (GCP) captures and provides visibility into all network traffic directed to your web applications. This includes information about the source, destination, and nature of the traffic.

### Rationale:

HTTP(S) Load Balancer logging provides critical insights into the network activity of web applications, supporting:

-   Security monitoring.
    
-   Troubleshooting of connectivity issues.
    
-   Analytics for traffic patterns.
    
-   Forensic investigations.
    

### Impact:

Enabling logging may generate large log files on high-traffic systems, particularly if the sampling rate is set to 100% (1.0). Careful configuration of the sampling rate is essential to avoid excessive storage costs.

### Default Value:

Logging for HTTP(S) load balancers is disabled by default. When enabled, the default sample rate is set to 1.0 (100%). Adjust the sample rate to balance cost and logging requirements.

### Audit Steps:

#### Using Google Cloud Console:

1.  Navigate to Network services via the Navigation Menu in the Google Cloud Console.
    

             ![](https://support.icompaas.com/assets/kb/d9c325dd17f4a126.png)

2.  Select the desired HTTPS load balancer.
    

              ![](https://support.icompaas.com/assets/kb/47012a567259a9a4.png)

3.  Click Edit and go to Backend Configuration.
    

            ![](https://support.icompaas.com/assets/kb/56ecd99efd6c3dc3.png)

            ![](https://support.icompaas.com/assets/kb/b5021b8e931a7a45.png)

4.  Edit the corresponding backend service.
    

                ![](https://support.icompaas.com/assets/kb/7d6a0932f3bbf5e5.png)

5.  Verify that Enable Logging is selected and that the Sample Rate is set appropriately.
    

                 ![](https://support.icompaas.com/assets/kb/e8f6f0ccb5af4f59.png)

Using Google Cloud CLI:

Run the following command:

gcloud compute backend-services describe <serviceName>

1.  Confirm the enable-logging property is set to true and that the logging-sample-rate is configured appropriately.
    

### Remediation Steps:

#### Using Google Cloud Console:

1.  Navigate to Network services via the Navigation Menu.
    

                      ![](https://support.icompaas.com/assets/kb/dbd2a050dfb56b20.png)

2.  Select the HTTPS load balancer requiring updates.
    

                    ![](https://support.icompaas.com/assets/kb/23bb25e7704b0369.png)

3.  Click Edit and navigate to Backend Configuration.
    

                    ![](https://support.icompaas.com/assets/kb/70d41828ec958853.png)

4.  Edit the associated backend service.
    

                  ![](https://support.icompaas.com/assets/kb/551739bd29b6f95f.png)

5.  Enable the Logging option.
    

                    ![](https://support.icompaas.com/assets/kb/f6cd7854cb111383.png)

6.  Set the Sample Rate to the desired percentage (e.g., 0.5 for 50%).
    

                  ![](https://support.icompaas.com/assets/kb/90a2b7f99ede56ae.png)

7.  Save the configuration.
    

                ![](https://support.icompaas.com/assets/kb/4e903945562ef76b.png)

#### Using Google Cloud CLI:

Run the following command to enable logging and configure the sample rate:

gcloud compute backend-services update <serviceName> \\
    --region=REGION \\
    --enable-logging \\
    --logging-sample-rate=<percentageAsDecimal>

### References:

1.  [Google Cloud Load Balancing Documentation](https://cloud.google.com/load-balancing/)
    
2.  [gcloud Command Reference for Backend Services](https://cloud.google.com/sdk/gcloud/reference/compute/backend-services/)
    

### CIS Controls:

<table style="border:none;border-collapse:collapse;font-family:&quot;Helvetica Neue&quot;"><colgroup style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"></colgroup><tbody style="font-family:&quot;Helvetica Neue&quot;"><tr style="height:41.5pt;font-family:&quot;Helvetica Neue&quot;"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;text-align:center;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-family:&quot;Helvetica Neue&quot;">Control</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;text-align:center;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">Description</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;text-align:center;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">IG 1</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;text-align:center;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">IG 2</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;text-align:center;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">IG 3</span></span></span></p></td></tr><tr style="height:41.5pt;font-family:&quot;Helvetica Neue&quot;"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-family:&quot;Helvetica Neue&quot;">8.2 Collect Audit Logs</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Ensure audit logs are collected across enterprise assets to support security and forensic analysis.</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td></tr><tr style="height:41.5pt;font-family:&quot;Helvetica Neue&quot;"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-family:&quot;Helvetica Neue&quot;">6.2 Activate Audit Logging</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Enable local logging for all systems and networking devices.</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;"><strong><span style="font-size:13px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td></tr></tbody></table>

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
