DescribeInstancesHealth
Retrieves detailed information about the health of instances in your AWS Elastic Beanstalk. This operation requires enhanced health reporting.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- AttributeNames.member.N
-
Specifies the response elements you wish to receive. To retrieve all attributes, set to
All
. If no attribute names are specified, returns a list of instances.Type: Array of strings
Valid Values:
HealthStatus | Color | Causes | ApplicationMetrics | RefreshedAt | LaunchedAt | System | Deployment | AvailabilityZone | InstanceType | All
Required: No
- EnvironmentId
-
Specify the AWS Elastic Beanstalk environment by ID.
Type: String
Required: No
- EnvironmentName
-
Specify the AWS Elastic Beanstalk environment by name.
Type: String
Length Constraints: Minimum length of 4. Maximum length of 40.
Required: No
- NextToken
-
Specify the pagination token returned by a previous call.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: No
Response Elements
The following elements are returned by the service.
- InstanceHealthList.member.N
-
Detailed health information about each instance.
The output differs slightly between Linux and Windows environments. There is a difference in the members that are supported under the
<CPUUtilization>
type.Type: Array of SingleInstanceHealth objects
- NextToken
-
Pagination token for the next page of results, if available.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
- RefreshedAt
-
The date and time that the health information was retrieved.
Type: Timestamp
Errors
For information about the errors that are common to all actions, see Common Errors.
- ElasticBeanstalkService
-
A generic service exception has occurred.
HTTP Status Code: 400
- InvalidRequest
-
One or more input parameters is not valid. Please correct the input parameters and try the operation again.
HTTP Status Code: 400
Examples
Request a single instance health attribute
This example illustrates one usage of DescribeInstancesHealth.
DescribeInstancesHealth {"EnvironmentName":"test-1","AttributeNames":["HealthStatus"]} <DescribeInstancesHealthResponse xmlns='http://elasticbeanstalk.amazonaws.com/docs/2010-12-01/'> <DescribeInstancesHealthResult> <InstanceHealthList> <member> <HealthStatus>Degraded</HealthStatus> <InstanceId>i-dc6ee922</InstanceId> </member> </InstanceHealthList> </DescribeInstancesHealthResult> <ResponseMetadata> <RequestId>94808e26-3a47-11e5-94eb-3d0f44fb8967</RequestId> </ResponseMetadata> </DescribeInstancesHealthResponse>
Request all instance health attributes for a Linux environment
This example shows the output for a Linux environment.
DescribeInstancesHealth {"EnvironmentName":"test-1","AttributeNames":["All"]} <DescribeInstancesHealthResponse xmlns='http://elasticbeanstalk.amazonaws.com/docs/2010-12-01/'> <DescribeInstancesHealthResult> <InstanceHealthList> <member> <HealthStatus>Degraded</HealthStatus> <System> <CPUUtilization> <Idle>6.9</Idle> <System>46.2</System> <Privileged>null</Privileged> <SoftIRQ>0.6</SoftIRQ> <Nice>0.0</Nice> <IOWait>0.1</IOWait> <User>46.2</User> <IRQ>0.0</IRQ> </CPUUtilization> <LoadAverage> <member>3.81</member> <member>2.11</member> <member>0.93</member> </LoadAverage> </System> <LaunchedAt>2015-07-17T07:58:58Z</LaunchedAt> <Color>Red</Color> <InstanceId>i-dc6ee922</InstanceId> <ApplicationMetrics> <Duration>10</Duration> <StatusCodes> <Status5xx>843</Status5xx> <Status4xx>0</Status4xx> <Status3xx>0</Status3xx> <Status2xx>3391</Status2xx> </StatusCodes> <Latency> <P90>0.002</P90> <P999>1.367</P999> <P99>0.003</P99> <P85>0.002</P85> <P50>0.001</P50> <P75>0.001</P75> <P95>0.002</P95> <P10>0.0</P10> </Latency> <RequestCount>4234</RequestCount> </ApplicationMetrics> <Causes> <member>19.9 % of the requests are failing with HTTP 5xx.</member> <member>93 % of CPU is in use.</member> </Causes> </member> </InstanceHealthList> <RefreshedAt>2015-08-04T01:24:34Z</RefreshedAt> </DescribeInstancesHealthResult> <ResponseMetadata> <RequestId>94a07242-3a47-11e5-91c3-1f9989a744d4</RequestId> </ResponseMetadata> </DescribeInstancesHealthResponse>
Request all instance health attributes for a Windows environment
In a Windows environment, there are different supported members in the
<CPUUtilization>
type:
... <CPUUtilization> <Idle>9.6</Idle> <System>null</System> <Privileged>45.2</Privileged> <SoftIRQ>null</SoftIRQ> <Nice>null</Nice> <IOWait>null</IOWait> <User>45.2</User> <IRQ>null</IRQ> </CPUUtilization> ...
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: