Getting Information About Your Access Logs

You can get information about access logs for your load balancers, such as the emit interval and the OOS bucket name.

Getting Information About Your Access Logs Using OSC CLI

The ReadLoadBalancers command lists one or more load balancers and their attributes.

Request sample
$ osc-cli api ReadLoadBalancers --profile "default" \
    --Filters '{
        "LoadBalancerNames": ["private*"],
      }'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Filters: (optional) One or more filters.

The ReadLoadBalancers command returns the following elements:

  • LoadBalancers: Information about one or more load balancers.

  • ResponseContext: Information about the context of the response.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancers": [
    {
      "Tags": [],
      "SourceSecurityGroup": {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupAccountId": "123456789012"
      },
      "SecuredCookies": false,
      "PublicIp": "192.0.2.0",
      "Subnets": [
        "subnet-12345678"
      ],
      "NetId": "vpc-12345678",
      "BackendVmIds": [],
      "ApplicationStickyCookiePolicies": [],
      "SecurityGroups": [
        "sg-12345678"
      ],
      "LoadBalancerType": "internet-facing",
      "AccessLog": {
        "PublicationInterval": 60,
        "IsEnabled": false
      },
      "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
      "HealthCheck": {
        "UnhealthyThreshold": 2,
        "Timeout": 5,
        "CheckInterval": 30,
        "Protocol": "TCP",
        "HealthyThreshold": 10,
        "Port": 80
      },
      "LoadBalancerStickyCookiePolicies": [],
      "SubregionNames": [
        "eu-west-2a"
      ],
      "Listeners": [
        {
          "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
          "BackendPort": 80,
          "BackendProtocol": "HTTP",
          "LoadBalancerPort": 443,
          "LoadBalancerProtocol": "HTTPS"
        }
      ],
      "LoadBalancerName": "private-lb-example"
    }
  ]
}

Getting Information About Your Access Logs Using AWS CLI

To get information about the access logs of a load balancer, use the describe-load-balancer-attributes command following this syntax:

Request sample
$ aws elb describe-load-balancer-attributes \
    --profile YOUR_PROFILE  \
    --load-balancer-name LOAD_BALANCER_NAME \
    --endpoint https://lbu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • load-balancer-name: The name of the load balancer whose access logs you want to get information about.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The describe-load-balancer-attributes command returns the following elements:

  • LoadBalancerAttributes: Information about the specified load balancer. This element contains the following information:

    • AccessLog: Information about the publication of the access logs. This element contains the following information:

      • S3BucketPrefix: The path to the folder in your OOS bucket for the publication of the access logs. If not specified, they are published at the root level of your bucket.

      • EmitInterval: The time span for the publication of the access logs in the OOS bucket, that can be either 5 or 60 minutes (by default, 60 minutes).

      • Enabled: If true, the access logs are enabled for the specified load balancer. If false, they are not.

      • S3BucketName: The name of the OOS bucket in which the access logs are published. For more information, see About OOS.

        Result sample
        {
            "LoadBalancerAttributes": {
                "AccessLog": {
                    "S3BucketPrefix": "BUCKET_PREFIX",
                    "EmitInterval": 60,
                    "Enabled": true,
                    "S3BucketName":"BUCKET_NAME"
                }
            }
        }

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.