Note:

You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . elasticbeanstalk ]

describe-environment-health

Description

Returns information about the overall health of the specified environment. The DescribeEnvironmentHealth operation is only available with AWS Elastic Beanstalk Enhanced Health.

See also: AWS API Documentation

Synopsis

  describe-environment-health
[--environment-name <value>]
[--environment-id <value>]
[--attribute-names <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]

Options

--environment-name (string)

Specify the environment by name.

You must specify either this or an EnvironmentName, or both.

--environment-id (string)

Specify the environment by ID.

You must specify either this or an EnvironmentName, or both.

--attribute-names (list)

Specify the response elements to return. To retrieve all attributes, set to All . If no attribute names are specified, returns the name of the environment.

(string)

Syntax:

"string" "string" ...

Where valid values are:
  Status
  Color
  Causes
  ApplicationMetrics
  InstancesHealth
  All
  HealthStatus
  RefreshedAt

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command's default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

Examples

Note

To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.

Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal's quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .

To view environment health

The following command retrieves overall health information for an environment named my-env:

aws elasticbeanstalk describe-environment-health --environment-name my-env --attribute-names All

Output:

{
    "Status": "Ready",
    "EnvironmentName": "my-env",
    "Color": "Green",
    "ApplicationMetrics": {
        "Duration": 10,
        "Latency": {
            "P99": 0.004,
            "P75": 0.002,
            "P90": 0.003,
            "P95": 0.004,
            "P85": 0.003,
            "P10": 0.001,
            "P999": 0.004,
            "P50": 0.001
        },
        "RequestCount": 45,
        "StatusCodes": {
            "Status3xx": 0,
            "Status2xx": 45,
            "Status5xx": 0,
            "Status4xx": 0
        }
    },
    "RefreshedAt": "2015-08-20T21:09:18Z",
    "HealthStatus": "Ok",
    "InstancesHealth": {
        "Info": 0,
        "Ok": 1,
        "Unknown": 0,
        "Severe": 0,
        "Warning": 0,
        "Degraded": 0,
        "NoData": 0,
        "Pending": 0
    },
    "Causes": []
}

Health information is only available for environments with enhanced health reporting enabled. For more information, see Enhanced Health Reporting and Monitoring in the AWS Elastic Beanstalk Developer Guide.

Output

EnvironmentName -> (string)

The environment's name.

HealthStatus -> (string)

The health status of the environment. For example, Ok .

Status -> (string)

The environment's operational status. Ready , Launching , Updating , Terminating , or Terminated .

Color -> (string)

The health color of the environment.

Causes -> (list)

Descriptions of the data that contributed to the environment's current health status.

(string)

ApplicationMetrics -> (structure)

Application request metrics for the 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 -> (structure)

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 -> (structure)

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

P999 -> (double)

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

P99 -> (double)

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

P95 -> (double)

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

P90 -> (double)

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

P85 -> (double)

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

P75 -> (double)

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

P50 -> (double)

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

P10 -> (double)

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

InstancesHealth -> (structure)

Summary health information for the instances in the environment.

NoData -> (integer)

Grey. AWS Elastic Beanstalk and the health agent are reporting no data on an instance.

Unknown -> (integer)

Grey. AWS Elastic Beanstalk and the health agent are reporting an insufficient amount of data on an instance.

Pending -> (integer)

Grey. An operation is in progress on an instance within the command timeout.

Ok -> (integer)

Green. An instance is passing health checks and the health agent is not reporting any problems.

Info -> (integer)

Green. An operation is in progress on an instance.

Warning -> (integer)

Yellow. The health agent is reporting a moderate number of request failures or other issues for an instance or environment.

Degraded -> (integer)

Red. The health agent is reporting a high number of request failures or other issues for an instance or environment.

Severe -> (integer)

Red. The health agent is reporting a very high number of request failures or other issues for an instance or environment.

RefreshedAt -> (timestamp)

The date and time that the health information was retrieved.