Getting Information About Your Load Balancers
You can get information about your load balancers using AWS CLI.
Getting Information About Your Load Balancers Using OSC CLI
The ReadLoadBalancers command lists one or more load balancers and their attributes.
$ 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.-
LoadBalancerNames
: (optional) The names of the load balancers.
-
The ReadLoadBalancers command returns the following elements:
-
LoadBalancers
: Information about one or more load balancers.-
AccessLog
: Information about access logs.-
IsEnabled
: If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, theOsuBucketName
parameter is required. -
OsuBucketName
: The name of the OOS bucket for the access logs. -
OsuBucketPrefix
: The path to the folder of the access logs in your OOS bucket (by default, theroot
level of your bucket). -
PublicationInterval
: The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either5
or60
(by default,60
).
-
-
ApplicationStickyCookiePolicies
: The stickiness policies defined for the load balancer.-
CookieName
: The name of the application cookie used for stickiness. -
PolicyName
: The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.
-
-
BackendIps
: One or more public IPs of backend VMs. -
BackendVmIds
: One or more IDs of backend VMs for the load balancer. -
DnsName
: The DNS name of the load balancer. -
HealthCheck
: Information about the health check configuration.-
CheckInterval
: The number of seconds between two requests (between5
and600
both included). -
HealthyThreshold
: The number of consecutive successful requests before considering the VM as healthy (between2
and10
both included). -
Path
: If you use the HTTP or HTTPS protocols, the request URL path. -
Port
: The port number (between1
and65535
, both included). -
Protocol
: The protocol for the URL of the VM (HTTP
|HTTPS
|TCP
|SSL
). -
Timeout
: The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between2
and60
both included). -
UnhealthyThreshold
: The number of consecutive failed requests before considering the VM as unhealthy (between2
and10
both included).
-
-
Listeners
: The listeners for the load balancer.-
BackendPort
: The port on which the backend VM is listening (between1
and65535
, both included). -
BackendProtocol
: The protocol for routing traffic to backend VMs (HTTP
|HTTPS
|TCP
|SSL
). -
LoadBalancerPort
: The port on which the load balancer is listening (between1
and65535
, both included). -
LoadBalancerProtocol
: The routing protocol (HTTP
|HTTPS
|TCP
|SSL
). -
PolicyNames
: The names of the policies. If there are no policies enabled, the list is empty. -
ServerCertificateId
: The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
-
-
LoadBalancerName
: The name of the load balancer. -
LoadBalancerStickyCookiePolicies
: The policies defined for the load balancer.-
CookieExpirationPeriod
: The time period, in seconds, after which the cookie should be considered stale.
If1
, the stickiness session lasts for the duration of the browser session. -
PolicyName
: The name of the stickiness policy.
-
-
LoadBalancerType
: The type of load balancer. Valid only for load balancers in a Net.
IfLoadBalancerType
isinternet-facing
, the load balancer has a public DNS name that resolves to a public IP.
IfLoadBalancerType
isinternal
, the load balancer has a public DNS name that resolves to a private IP. -
NetId
: The ID of the Net for the load balancer. -
PublicIp
: (internet-facing only) The public IP associated with the load balancer. -
SecuredCookies
: Whether secure cookies are enabled for the load balancer. -
SecurityGroups
: One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net. -
SourceSecurityGroup
: Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.
To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.-
SecurityGroupAccountId
: The account ID of the owner of the security group. -
SecurityGroupName
: The name of the security group.
-
-
Subnets
: The ID of the Subnet in which the load balancer was created. -
SubregionNames
: The ID of the Subregion in which the load balancer was created. -
Tags
: One or more tags associated with the load balancer.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"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 Load Balancers Using oapi-cli
The ReadLoadBalancers command lists one or more load balancers and their attributes.
$ oapi-cli --profile "default" ReadLoadBalancers \
--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.-
LoadBalancerNames
: (optional) The names of the load balancers.
-
The ReadLoadBalancers command returns the following elements:
-
LoadBalancers
: Information about one or more load balancers.-
AccessLog
: Information about access logs.-
IsEnabled
: If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, theOsuBucketName
parameter is required. -
OsuBucketName
: The name of the OOS bucket for the access logs. -
OsuBucketPrefix
: The path to the folder of the access logs in your OOS bucket (by default, theroot
level of your bucket). -
PublicationInterval
: The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either5
or60
(by default,60
).
-
-
ApplicationStickyCookiePolicies
: The stickiness policies defined for the load balancer.-
CookieName
: The name of the application cookie used for stickiness. -
PolicyName
: The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.
-
-
BackendIps
: One or more public IPs of backend VMs. -
BackendVmIds
: One or more IDs of backend VMs for the load balancer. -
DnsName
: The DNS name of the load balancer. -
HealthCheck
: Information about the health check configuration.-
CheckInterval
: The number of seconds between two requests (between5
and600
both included). -
HealthyThreshold
: The number of consecutive successful requests before considering the VM as healthy (between2
and10
both included). -
Path
: If you use the HTTP or HTTPS protocols, the request URL path. -
Port
: The port number (between1
and65535
, both included). -
Protocol
: The protocol for the URL of the VM (HTTP
|HTTPS
|TCP
|SSL
). -
Timeout
: The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between2
and60
both included). -
UnhealthyThreshold
: The number of consecutive failed requests before considering the VM as unhealthy (between2
and10
both included).
-
-
Listeners
: The listeners for the load balancer.-
BackendPort
: The port on which the backend VM is listening (between1
and65535
, both included). -
BackendProtocol
: The protocol for routing traffic to backend VMs (HTTP
|HTTPS
|TCP
|SSL
). -
LoadBalancerPort
: The port on which the load balancer is listening (between1
and65535
, both included). -
LoadBalancerProtocol
: The routing protocol (HTTP
|HTTPS
|TCP
|SSL
). -
PolicyNames
: The names of the policies. If there are no policies enabled, the list is empty. -
ServerCertificateId
: The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
-
-
LoadBalancerName
: The name of the load balancer. -
LoadBalancerStickyCookiePolicies
: The policies defined for the load balancer.-
CookieExpirationPeriod
: The time period, in seconds, after which the cookie should be considered stale.
If1
, the stickiness session lasts for the duration of the browser session. -
PolicyName
: The name of the stickiness policy.
-
-
LoadBalancerType
: The type of load balancer. Valid only for load balancers in a Net.
IfLoadBalancerType
isinternet-facing
, the load balancer has a public DNS name that resolves to a public IP.
IfLoadBalancerType
isinternal
, the load balancer has a public DNS name that resolves to a private IP. -
NetId
: The ID of the Net for the load balancer. -
PublicIp
: (internet-facing only) The public IP associated with the load balancer. -
SecuredCookies
: Whether secure cookies are enabled for the load balancer. -
SecurityGroups
: One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net. -
SourceSecurityGroup
: Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.
To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.-
SecurityGroupAccountId
: The account ID of the owner of the security group. -
SecurityGroupName
: The name of the security group.
-
-
Subnets
: The ID of the Subnet in which the load balancer was created. -
SubregionNames
: The ID of the Subregion in which the load balancer was created. -
Tags
: One or more tags associated with the load balancer.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"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 Load Balancers Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
Getting General Information About Your Load Balancers
To get information about one or more load balancers, use the describe-load-balancers command following this syntax:
$ aws elb describe-load-balancers \
--profile YOUR_PROFILE \
--load-balancer-names my-load-balancer \
--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. -
(optional)
load-balancer-names
: The name of one or more load balancers.If you do not specify any load balancer name, the request returns a description of all your load balancers.
-
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The describe-load-balancers command returns the following elements:
-
LoadBalancerDescriptions
: Information about one or more load balancers. This element contains the following information for each load balancer:-
Subnets
: The ID of the subnet in which the load balancer was created, if it is in a VPC. -
ListenerDescriptions
: Information about one or more listeners added to the load balancer. This element contains the following information for each listener:-
Listener
: Information about a listener:-
InstancePort
: The port on which the backend instances are listening. -
LoadBalancerPort
: The port on which the load balancer is listening. -
Protocol
: The routing protocol of the load balancer (HTTP
,HTTPS
,TCP
orSSL
). -
InstanceProtocol
: The protocol used for routing traffic to backend instances (HTTP
orTCP
).
-
-
PolicyNames
: The names of the policies attached to the load balancer, if any.
-
-
HealthCheck
: Information about the health check configuration for the load balancer. This element contains the following information:-
HealthyThreshold
: The number of consecutive successful requests to consider the instance as healthy. -
Interval
: The number of seconds between two requests. -
Target
: The port and protocol for backend instances targeted by the health check (and the path to check for HTTP protocol). -
Timeout
: The maximum waiting time for a response before considering the request as failed, in seconds. -
UnhealthyThreshold
: The number of consecutive failed requests to consider the instance as unhealthy.
-
-
VPCId
: The VPC ID for the load balancer, if any. -
BackendServerDescriptions
: Information about the backend instances. This element contains the following information for each backend instance:-
InstancePort
: The port on which backend instances are listening. -
PolicyNames
: The names of the policies enabled for backend instances, if any.
-
-
Instances
: Information about one or more backend instances. This element contains the following information for each backend instance:-
InstanceId
: The ID of the backend instance.
-
-
DNSName
: The DNS name for the load balancer. -
SecurityGroups
: The security groups for the load balancer, if it is in a VPC. -
Policies
: Information about the policies for the load balancer, if any.-
LBCookieStickinessPolicies
: The name of the policy used for duration-based session stickiness. For more information, see Configuring Sticky Sessions for Your Load Balancers. -
AppCookieStickinessPolicies
: The name of the policy for application-controlled session stickiness. For more information, see Configuring Sticky Sessions for Your Load Balancers. -
OtherPolicies
: The names of the policies other than the stickiness policies.
-
-
LoadBalancerName
: The name of the load balancer. -
CreatedTime
: The date and time of creation of the load balancer. -
AvailabilityZones
: The ID of the Availability Zone (AZ) in which the load balancer was created. In the public Cloud, this AZ is the one that was specified at load balancer creation. In a VPC, this AZ is the one corresponding to the subnet that was specified at load balancer creation. -
Scheme
: The type of load balancer. For more information, see About Load Balancers > Load Balancer Types.
-
{
"LoadBalancerDescriptions": [
{
"Subnets": [
"subnet-12345678"
],
"ListenerDescriptions": [
{
"Listener": {
"InstancePort": 80,
"LoadBalancerPort": 80,
"Protocol": "HTTP",
"InstanceProtocol": "HTTP"
},
"PolicyNames": []
},
],
"HealthCheck": {
"HealthyThreshold": 3,
"Interval": 15,
"Target": "HTTP:80/index.html",
"Timeout": 3,
"UnhealthyThreshold": 3
},
"VPCId": "vpc-87654321",
"BackendServerDescriptions": [
{
"InstancePort": 80,
"PolicyNames": []
}
],
"Instances": [
{
"InstanceId": "i-56781234"
},
{
"InstanceId": "i-43218765"
}
],
"DNSName": "my-load-balancer-1234567890.lbu.eu-west-2.outscale.com",
"SecurityGroups": [
"sg-18273465"
],
"Policies": {
"LBCookieStickinessPolicies": [],
"AppCookieStickinessPolicies": [],
"OtherPolicies": []
},
"LoadBalancerName": "my-load-balancer",
"CreatedTime": "2016-05-12T05:22:08.364Z",
"AvailabilityZones": [
"eu-west-2a"
],
"Scheme": "internet-facing",
"SourceSecurityGroup": {
"OwnerAlias": "123456789012",
"GroupName": "my-lb-sg"
}
}
]
}
Getting Information About the Attributes of Your Load Balancers
To get information about the attributes of a load balancer, use the describe-load-balancer-attributes command following this syntax:
$ 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. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The describe-load-balancer-attributes command returns the following elements:
-
LoadBalancerAttributes
: The attributes of the load balancer. This element contains the following information:-
AccessLog
: Information about the publication of the access logs. This element contains the following information:-
Enabled
: Iftrue
, the access logs are enabled for the specified load balancer. Iffalse
, they are not. -
S3BucketName
: The name of the OOS bucket in which the access logs are published. For more information, see About OOS. -
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). -
S3BucketPrefix
: The path to the folder in your OOS bucket for the publication of the access logs. If not specified, they are published at theroot
level of your bucket.
-
-
ConnectionDraining
: Information about the draining of the connections. This element contains the following information:-
Enabled
: Iftrue
, connection draining is enabled for your load balancer. Iffalse
, they are not. -
Timeout
: The time that the load balancer keeps the existing connections open before deregistering instances, in seconds.
-
-
ConnectionSettings
: Information about idle connections. This element contains the following information:-
IdleTimeout
: The time that the connection is allowed to be idle before it is closed by the load balancer, in seconds.
-
-
AdditionalAttributes
: Information about additional load balancer attributes. This element contains the following information:-
Key
: The name of the attribute, for exampleSecuredCookies
. -
Value
: The value of the attribute. If the Key isSecuredCookies
and the Value istrue
, secure cookies are enabled. Iffalse
, they are not.
-
-
{
"LoadBalancerAttributes": {
"AccessLog": {
"Enabled": true,
"S3BucketName": "BUCKET_NAME",
"EmitInterval": 60,
"S3BucketPrefix": "BUCKET_PREFIX"
},
"ConnectionDraining": {
"Enabled": true,
"Timeout": 1
},
"ConnectionSettings": {
"IdleTimeout": 1
},
"AdditionalAttributes": [
{
"Key": "SecuredCookies",
"Value": "true"
}
]
}
}
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.