AWS Elastic Beanstalk

2016/04/07 - AWS Elastic Beanstalk - 1 updated api methods

DescribeInstancesHealth (updated) Link ΒΆ
Changes (request, response)
Request
{'AttributeNames': {'AvailabilityZone', 'InstanceType', 'Deployment'}}
Response
{'InstanceHealthList': {'AvailabilityZone': 'string',
                        'Deployment': {'DeploymentId': 'long',
                                       'DeploymentTime': 'timestamp',
                                       'Status': 'string',
                                       'VersionLabel': 'string'},
                        'InstanceType': 'string'}}

Returns more detailed information about the health of the specified instances (for example, CPU utilization, load average, and causes). The DescribeInstancesHealth operation is only available with AWS Elastic Beanstalk Enhanced Health.

Request Syntax

client.describe_instances_health(
    EnvironmentName='string',
    EnvironmentId='string',
    AttributeNames=[
        'HealthStatus'|'Color'|'Causes'|'ApplicationMetrics'|'RefreshedAt'|'LaunchedAt'|'System'|'Deployment'|'AvailabilityZone'|'InstanceType'|'All',
    ],
    NextToken='string'
)
type EnvironmentName

string

param EnvironmentName

Specifies the AWS Elastic Beanstalk environment name.

type EnvironmentId

string

param EnvironmentId

Specifies the AWS Elastic Beanstalk environment ID.

type AttributeNames

list

param AttributeNames

Specifies the response elements you wish to receive. If no attribute names are specified, AWS Elastic Beanstalk only returns a list of instances.

  • (string) --

type NextToken

string

param NextToken

Specifies the next token of the request.

rtype

dict

returns

Response Syntax

{
    'InstanceHealthList': [
        {
            'InstanceId': 'string',
            'HealthStatus': 'string',
            'Color': 'string',
            'Causes': [
                'string',
            ],
            'LaunchedAt': datetime(2015, 1, 1),
            'ApplicationMetrics': {
                'Duration': 123,
                'RequestCount': 123,
                'StatusCodes': {
                    'Status2xx': 123,
                    'Status3xx': 123,
                    'Status4xx': 123,
                    'Status5xx': 123
                },
                'Latency': {
                    'P999': 123.0,
                    'P99': 123.0,
                    'P95': 123.0,
                    'P90': 123.0,
                    'P85': 123.0,
                    'P75': 123.0,
                    'P50': 123.0,
                    'P10': 123.0
                }
            },
            'System': {
                'CPUUtilization': {
                    'User': 123.0,
                    'Nice': 123.0,
                    'System': 123.0,
                    'Idle': 123.0,
                    'IOWait': 123.0,
                    'IRQ': 123.0,
                    'SoftIRQ': 123.0
                },
                'LoadAverage': [
                    123.0,
                ]
            },
            'Deployment': {
                'VersionLabel': 'string',
                'DeploymentId': 123,
                'Status': 'string',
                'DeploymentTime': datetime(2015, 1, 1)
            },
            'AvailabilityZone': 'string',
            'InstanceType': 'string'
        },
    ],
    'RefreshedAt': datetime(2015, 1, 1),
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    See the example below for a sample response.

    • InstanceHealthList (list) --

      Contains the response body with information about the health of the instance.

      • (dict) --

        Represents health information from the specified instance that belongs to the AWS Elastic Beanstalk environment. Use the InstanceId property to specify the application instance for which you'd like to return data.

        • InstanceId (string) --

          The ID of the Amazon EC2 instance.

        • HealthStatus (string) --

          Returns the health status of the specified instance. For more information, see Health Colors and Statuses.

        • Color (string) --

          Represents the color indicator that gives you information about the health of the EC2 instance. For more information, see Health Colors and Statuses.

        • Causes (list) --

          Represents the causes, which provide more information about the current health status.

          • (string) --

        • LaunchedAt (datetime) --

          The time at which the EC2 instance was launched.

        • ApplicationMetrics (dict) --

          Represents the application metrics for a specified environment.

          • Duration (integer) --

            The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests ( request_count ) within the most recent time slice of 10 seconds ( duration ).

          • RequestCount (integer) --

            Average number of requests handled by the web server per second over the last 10 seconds.

          • StatusCodes (dict) --

            Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.

            • Status2xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 2xx (200, 201, etc.) status code.

            • Status3xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 3xx (300, 301, etc.) status code.

            • Status4xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 4xx (400, 401, etc.) status code.

            • Status5xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 5xx (500, 501, etc.) status code.

          • Latency (dict) --

            Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.

            • P999 (float) --

              The average latency for the slowest 0.1 percent of requests over the last 10 seconds.

            • P99 (float) --

              The average latency for the slowest 1 percent of requests over the last 10 seconds.

            • P95 (float) --

              The average latency for the slowest 5 percent of requests over the last 10 seconds.

            • P90 (float) --

              The average latency for the slowest 10 percent of requests over the last 10 seconds.

            • P85 (float) --

              The average latency for the slowest 15 percent of requests over the last 10 seconds.

            • P75 (float) --

              The average latency for the slowest 25 percent of requests over the last 10 seconds.

            • P50 (float) --

              The average latency for the slowest 50 percent of requests over the last 10 seconds.

            • P10 (float) --

              The average latency for the slowest 90 percent of requests over the last 10 seconds.

        • System (dict) --

          Represents CPU utilization and load average information for applications running in the specified environment.

          • CPUUtilization (dict) --

            Represents CPU utilization information from the specified instance that belongs to the AWS Elastic Beanstalk environment. Use the instanceId property to specify the application instance for which you'd like to return data.

            • User (float) --

              Percentage of time that the CPU has spent in the User state over the last 10 seconds.

            • Nice (float) --

              Percentage of time that the CPU has spent in the Nice state over the last 10 seconds.

            • System (float) --

              Percentage of time that the CPU has spent in the System state over the last 10 seconds.

            • Idle (float) --

              Percentage of time that the CPU has spent in the Idle state over the last 10 seconds.

            • IOWait (float) --

              Percentage of time that the CPU has spent in the I/O Wait state over the last 10 seconds.

            • IRQ (float) --

              Percentage of time that the CPU has spent in the IRQ state over the last 10 seconds.

            • SoftIRQ (float) --

              Percentage of time that the CPU has spent in the SoftIRQ state over the last 10 seconds.

          • LoadAverage (list) --

            Load average in the last 1-minute and 5-minute periods. For more information, see Operating System Metrics.

            • (float) --

        • Deployment (dict) --

          Information about the most recent deployment to an instance.

          • VersionLabel (string) --

            The version label of the application version in the deployment.

          • DeploymentId (integer) --

            The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.

          • Status (string) --

            The status of the deployment:

            • In Progress : The deployment is in progress.

            • Deployed : The deployment succeeded.

            • Failed : The deployment failed.

          • DeploymentTime (datetime) --

            For in-progress deployments, the time that the deloyment started.

            For completed deployments, the time that the deployment ended.

        • AvailabilityZone (string) --

          The availability zone in which the instance runs.

        • InstanceType (string) --

          The instance's type.

    • RefreshedAt (datetime) --

      The date and time the information was last refreshed.

    • NextToken (string) --

      The next token.