Skip to main content

Cloud load balancer logs

Last update:

Load balancer logging uses the Logs service. For more details on the service principle of operation and pricing, see the Logs service overview instruction. You can check the availability of the Logs service for load balancers in regions in the Logs availability matrix.

The following types of events are logged for a load balancer:

Depending on the event type, a different set of fields is recorded.

To collect load balancer logs, you need to enable logging for the load balancer. Retrieving logs is only possible via the API. If you no longer need to collect logs, you can disable logging.

Enable logging for a load balancer

You can enable logging via the API or in the control panel — when creating a load balancer or for an existing load balancer.

Enable logging for an existing load balancer

Logging consumes some of the load balancer's computing resources.

  1. In the control panel, on the top menu, click Products and select Cloud Servers.
  2. Go to Load Balancers → tab Load Balancers.
  3. Open the load balancer page.
  4. In the Settings block, in the Logging field, click .
  5. Select the Collect technical load balancer logs checkbox.
  6. Select a log group or create a new one. You can log events from one or several load balancers into the same group.
  7. If you selected a new group, enter its name.
  8. Click Save.

Disable logging for a load balancer

  1. In the control panel, on the top menu, click Products and select Cloud Servers.
  2. Go to Load Balancers → tab Load Balancers.
  3. Open the load balancer page.
  4. In the Settings block, in the Logging field, click .
  5. Clear the Collect technical load balancer logs checkbox.
  6. Click Save.

Retrieve logs

Use the Retrieve logs instruction in the Logs section.

See the description of log fields for a load balancer.

Log fields

Depending on the event type, different sets of fields are displayed in the log.

loadbalancer_idLoad balancer ID
elapsedRequest processing duration
urlRequest URL
versionHTTP protocol version
methodHTTP method of the request to the load balancer
statusHTTP response status
bytest_inNumber of bytes transmitted in the request
bytes_outNumber of bytes transmitted in the response
backendLoad balancer target group ID
clientIP address and port from which the request originated
frontendLoad balancer rule ID
serverServer ID in the load balancer target group
termination_stateSession state at disconnection; for more details, see the Session state at disconnection section of the HAProxy 2.4 documentation
frontend_connectionsNumber of open connections for the load balancer rule
backend_connectionsNumber of open connections for the load balancer target group
server_connectionsNumber of open connections on the server that received the request
retriesNumber of request retries to the server
destinationIP address of the server that received the request
backend_queueNumber of requests in the load balancer target group waiting to be processed
server_queueNumber of requests on the server waiting to be processed