Skip to content

Save access logs to a bucket

View as Markdown

With access logs on, the load balancer saves its request logs to a bucket you own in E2E Object Storage. You can download them and keep them as long as you need, with any tool that works with E2E Object Storage.

  • You have a bucket in E2E Object Storage for the logs. See Create a bucket.
  • You have an access key with write access to that bucket, and its secret key. See Generate an access key.
  • The load balancer reads Running or Backend Connection Failure.
  • Your role in the project has the update permission for Load Balancers.
  1. In MyAccount, under Compute, click Load Balancers, click the load balancer, and open its Info tab. Access Details reads Disabled.
  2. Click Activate. Enable Access Logs opens.
  3. Fill in the bucket and the key:
    • EOS Bucket: the bucket’s name, up to 50 letters, digits, hyphens, and underscores.
    • Access Key: the access key, 12 to 32 characters.
    • Secret Key: its secret key, 24 to 64 characters.
  4. Click Enable.

Access Log enabled successfully confirms it. If access logs are already on, Logging is already enabled. shows instead.

On the Info tab, Access Details reads Enabled, with View Logs. Click View Logs to open Object Storage, where the log files appear at the top level of your bucket.

As soon as you turn access logs on, the load balancer copies the request log it already holds to your bucket, unless that log is empty. After that, the load balancer copies the log on a regular schedule, and only when the log has reached 10 KB. Requests reach the bucket in batches, not as they happen. Each file it copies is compressed with gzip.

An Application Load Balancer writes one line for each HTTP request. Each line holds:

  • The client’s IP address and port.
  • The date and time the request arrived.
  • The listener that took the request.
  • The backend group and server the request went to.
  • Five timings, in milliseconds.
  • The status code.
  • The bytes sent to the client.
  • How the session ended.
  • Connection and queue counts.
  • The request line, in quotes.

A connection appears in the log once it sends a request.

The request logs live only in your bucket. The Action Logs tab lists actions taken on the load balancer, rather than requests. See Monitor a load balancer.

  1. On the Info tab, click Deactivate beside Access Details, and confirm.

The load balancer stops copying logs to the bucket. The files already there stay until you delete them.

If Activate or Deactivate is missing, check that the load balancer reads Running or Backend Connection Failure, and see Troubleshooting Load Balancer.