Amazon CloudWatch Application Insights

2020/03/25 - Amazon CloudWatch Application Insights - 6 updated api methods

Changes  Update application-insights client to latest version

CreateApplication (updated) Link ¶
Changes (request, response)
Request
{'CWEMonitorEnabled': 'boolean'}
Response
{'ApplicationInfo': {'CWEMonitorEnabled': 'boolean'}}

Adds an application that is created from a resource group.

See also: AWS API Documentation

Request Syntax

client.create_application(
    ResourceGroupName='string',
    OpsCenterEnabled=True|False,
    CWEMonitorEnabled=True|False,
    OpsItemSNSTopicArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ResourceGroupName:

string

param ResourceGroupName:

[REQUIRED]

The name of the resource group.

type OpsCenterEnabled:

boolean

param OpsCenterEnabled:

When set to true, creates opsItems for any problems detected on an application.

type CWEMonitorEnabled:

boolean

param CWEMonitorEnabled:

Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

type OpsItemSNSTopicArn:

string

param OpsItemSNSTopicArn:

The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.

type Tags:

list

param Tags:

List of tags to add to the application. tag key ( Key) and an associated tag value ( Value). The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.

  • (dict) --

    An object that defines the tags associated with an application. A tag is a label that you optionally define and associate with an application. Tags can help you categorize and manage resources in different ways, such as by purpose, owner, environment, or other criteria.

    Each tag consists of a required tag key and an associated tag value, both of which you define. A tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag value can contain as many as 256 characters. The characters can be Unicode letters, digits, white space, or one of the following symbols: _ . : / = + -. The following additional restrictions apply to tags:

    • Tag keys and values are case sensitive.

    • For each associated resource, each tag key must be unique and it can have only one value.

    • The aws: prefix is reserved for use by AWS; you can’t use it in any tag keys or values that you define. In addition, you can't edit or remove tag keys or values that use this prefix.

    • Key (string) -- [REQUIRED]

      One part of a key-value pair that defines a tag. The maximum length of a tag key is 128 characters. The minimum length is 1 character.

    • Value (string) -- [REQUIRED]

      The optional part of a key-value pair that defines a tag. The maximum length of a tag value is 256 characters. The minimum length is 0 characters. If you don't want an application to have a specific tag value, don't specify a value for this parameter.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationInfo': {
        'ResourceGroupName': 'string',
        'LifeCycle': 'string',
        'OpsItemSNSTopicArn': 'string',
        'OpsCenterEnabled': True|False,
        'CWEMonitorEnabled': True|False,
        'Remarks': 'string'
    }
}

Response Structure

  • (dict) --

    • ApplicationInfo (dict) --

      Information about the application.

      • ResourceGroupName (string) --

        The name of the resource group used for the application.

      • LifeCycle (string) --

        The lifecycle of the application.

      • OpsItemSNSTopicArn (string) --

        The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS notifications for opsItem updates.

      • OpsCenterEnabled (boolean) --

        Indicates whether Application Insights will create opsItems for any problem detected by Application Insights for an application.

      • CWEMonitorEnabled (boolean) --

        Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

      • Remarks (string) --

        The issues on the user side that block Application Insights from successfully monitoring an application. Example remarks include:

        • “Configuring application, detected 1 Errors, 3 Warnings”

        • “Configuring application, detected 1 Unconfigured Components”

DescribeApplication (updated) Link ¶
Changes (response)
{'ApplicationInfo': {'CWEMonitorEnabled': 'boolean'}}

Describes the application.

See also: AWS API Documentation

Request Syntax

client.describe_application(
    ResourceGroupName='string'
)
type ResourceGroupName:

string

param ResourceGroupName:

[REQUIRED]

The name of the resource group.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationInfo': {
        'ResourceGroupName': 'string',
        'LifeCycle': 'string',
        'OpsItemSNSTopicArn': 'string',
        'OpsCenterEnabled': True|False,
        'CWEMonitorEnabled': True|False,
        'Remarks': 'string'
    }
}

Response Structure

  • (dict) --

    • ApplicationInfo (dict) --

      Information about the application.

      • ResourceGroupName (string) --

        The name of the resource group used for the application.

      • LifeCycle (string) --

        The lifecycle of the application.

      • OpsItemSNSTopicArn (string) --

        The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS notifications for opsItem updates.

      • OpsCenterEnabled (boolean) --

        Indicates whether Application Insights will create opsItems for any problem detected by Application Insights for an application.

      • CWEMonitorEnabled (boolean) --

        Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

      • Remarks (string) --

        The issues on the user side that block Application Insights from successfully monitoring an application. Example remarks include:

        • “Configuring application, detected 1 Errors, 3 Warnings”

        • “Configuring application, detected 1 Unconfigured Components”

DescribeObservation (updated) Link ¶
Changes (response)
{'Observation': {'CloudWatchEventDetailType': 'string',
                 'CloudWatchEventId': 'string',
                 'CloudWatchEventSource': 'EC2 | CODE_DEPLOY | HEALTH',
                 'CodeDeployApplication': 'string',
                 'CodeDeployDeploymentGroup': 'string',
                 'CodeDeployDeploymentId': 'string',
                 'CodeDeployInstanceGroupId': 'string',
                 'CodeDeployState': 'string',
                 'Ec2State': 'string',
                 'HealthEventArn': 'string',
                 'HealthEventDescription': 'string',
                 'HealthEventTypeCategory': 'string',
                 'HealthEventTypeCode': 'string',
                 'HealthService': 'string',
                 'XRayErrorPercent': 'integer',
                 'XRayFaultPercent': 'integer',
                 'XRayNodeName': 'string',
                 'XRayNodeType': 'string',
                 'XRayRequestAverageLatency': 'long',
                 'XRayRequestCount': 'integer',
                 'XRayThrottlePercent': 'integer'}}

Describes an anomaly or error with the application.

See also: AWS API Documentation

Request Syntax

client.describe_observation(
    ObservationId='string'
)
type ObservationId:

string

param ObservationId:

[REQUIRED]

The ID of the observation.

rtype:

dict

returns:

Response Syntax

{
    'Observation': {
        'Id': 'string',
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'SourceType': 'string',
        'SourceARN': 'string',
        'LogGroup': 'string',
        'LineTime': datetime(2015, 1, 1),
        'LogText': 'string',
        'LogFilter': 'ERROR'|'WARN'|'INFO',
        'MetricNamespace': 'string',
        'MetricName': 'string',
        'Unit': 'string',
        'Value': 123.0,
        'CloudWatchEventId': 'string',
        'CloudWatchEventSource': 'EC2'|'CODE_DEPLOY'|'HEALTH',
        'CloudWatchEventDetailType': 'string',
        'HealthEventArn': 'string',
        'HealthService': 'string',
        'HealthEventTypeCode': 'string',
        'HealthEventTypeCategory': 'string',
        'HealthEventDescription': 'string',
        'CodeDeployDeploymentId': 'string',
        'CodeDeployDeploymentGroup': 'string',
        'CodeDeployState': 'string',
        'CodeDeployApplication': 'string',
        'CodeDeployInstanceGroupId': 'string',
        'Ec2State': 'string',
        'XRayFaultPercent': 123,
        'XRayThrottlePercent': 123,
        'XRayErrorPercent': 123,
        'XRayRequestCount': 123,
        'XRayRequestAverageLatency': 123,
        'XRayNodeName': 'string',
        'XRayNodeType': 'string'
    }
}

Response Structure

  • (dict) --

    • Observation (dict) --

      Information about the observation.

      • Id (string) --

        The ID of the observation type.

      • StartTime (datetime) --

        The time when the observation was first detected, in epoch seconds.

      • EndTime (datetime) --

        The time when the observation ended, in epoch seconds.

      • SourceType (string) --

        The source type of the observation.

      • SourceARN (string) --

        The source resource ARN of the observation.

      • LogGroup (string) --

        The log group name.

      • LineTime (datetime) --

        The timestamp in the CloudWatch Logs that specifies when the matched line occurred.

      • LogText (string) --

        The log text of the observation.

      • LogFilter (string) --

        The log filter of the observation.

      • MetricNamespace (string) --

        The namespace of the observation metric.

      • MetricName (string) --

        The name of the observation metric.

      • Unit (string) --

        The unit of the source observation metric.

      • Value (float) --

        The value of the source observation metric.

      • CloudWatchEventId (string) --

        The ID of the CloudWatch Event-based observation related to the detected problem.

      • CloudWatchEventSource (string) --

        The source of the CloudWatch Event.

      • CloudWatchEventDetailType (string) --

        The detail type of the CloudWatch Event-based observation, for example, EC2 Instance State-change Notification.

      • HealthEventArn (string) --

        The Amazon Resource Name (ARN) of the AWS Health Event-based observation.

      • HealthService (string) --

        The service to which the AWS Health Event belongs, such as EC2.

      • HealthEventTypeCode (string) --

        The type of the AWS Health event, for example, AWS_EC2_POWER_CONNECTIVITY_ISSUE.

      • HealthEventTypeCategory (string) --

        The category of the AWS Health event, such as issue.

      • HealthEventDescription (string) --

        The description of the AWS Health event provided by the service, such as Amazon EC2.

      • CodeDeployDeploymentId (string) --

        The deployment ID of the CodeDeploy-based observation related to the detected problem.

      • CodeDeployDeploymentGroup (string) --

        The deployment group to which the CodeDeploy deployment belongs.

      • CodeDeployState (string) --

        The status of the CodeDeploy deployment, for example SUCCESS or FAILURE.

      • CodeDeployApplication (string) --

        The CodeDeploy application to which the deployment belongs.

      • CodeDeployInstanceGroupId (string) --

        The instance group to which the CodeDeploy instance belongs.

      • Ec2State (string) --

        The state of the instance, such as STOPPING or TERMINATING.

      • XRayFaultPercent (integer) --

        The X-Ray request fault percentage for this node.

      • XRayThrottlePercent (integer) --

        The X-Ray request throttle percentage for this node.

      • XRayErrorPercent (integer) --

        The X-Ray request error percentage for this node.

      • XRayRequestCount (integer) --

        The X-Ray request count for this node.

      • XRayRequestAverageLatency (integer) --

        The X-Ray node request average latency for this node.

      • XRayNodeName (string) --

        The name of the X-Ray node.

      • XRayNodeType (string) --

        The type of the X-Ray node.

DescribeProblemObservations (updated) Link ¶
Changes (response)
{'RelatedObservations': {'ObservationList': {'CloudWatchEventDetailType': 'string',
                                             'CloudWatchEventId': 'string',
                                             'CloudWatchEventSource': 'EC2 | '
                                                                      'CODE_DEPLOY '
                                                                      '| '
                                                                      'HEALTH',
                                             'CodeDeployApplication': 'string',
                                             'CodeDeployDeploymentGroup': 'string',
                                             'CodeDeployDeploymentId': 'string',
                                             'CodeDeployInstanceGroupId': 'string',
                                             'CodeDeployState': 'string',
                                             'Ec2State': 'string',
                                             'HealthEventArn': 'string',
                                             'HealthEventDescription': 'string',
                                             'HealthEventTypeCategory': 'string',
                                             'HealthEventTypeCode': 'string',
                                             'HealthService': 'string',
                                             'XRayErrorPercent': 'integer',
                                             'XRayFaultPercent': 'integer',
                                             'XRayNodeName': 'string',
                                             'XRayNodeType': 'string',
                                             'XRayRequestAverageLatency': 'long',
                                             'XRayRequestCount': 'integer',
                                             'XRayThrottlePercent': 'integer'}}}

Describes the anomalies or errors associated with the problem.

See also: AWS API Documentation

Request Syntax

client.describe_problem_observations(
    ProblemId='string'
)
type ProblemId:

string

param ProblemId:

[REQUIRED]

The ID of the problem.

rtype:

dict

returns:

Response Syntax

{
    'RelatedObservations': {
        'ObservationList': [
            {
                'Id': 'string',
                'StartTime': datetime(2015, 1, 1),
                'EndTime': datetime(2015, 1, 1),
                'SourceType': 'string',
                'SourceARN': 'string',
                'LogGroup': 'string',
                'LineTime': datetime(2015, 1, 1),
                'LogText': 'string',
                'LogFilter': 'ERROR'|'WARN'|'INFO',
                'MetricNamespace': 'string',
                'MetricName': 'string',
                'Unit': 'string',
                'Value': 123.0,
                'CloudWatchEventId': 'string',
                'CloudWatchEventSource': 'EC2'|'CODE_DEPLOY'|'HEALTH',
                'CloudWatchEventDetailType': 'string',
                'HealthEventArn': 'string',
                'HealthService': 'string',
                'HealthEventTypeCode': 'string',
                'HealthEventTypeCategory': 'string',
                'HealthEventDescription': 'string',
                'CodeDeployDeploymentId': 'string',
                'CodeDeployDeploymentGroup': 'string',
                'CodeDeployState': 'string',
                'CodeDeployApplication': 'string',
                'CodeDeployInstanceGroupId': 'string',
                'Ec2State': 'string',
                'XRayFaultPercent': 123,
                'XRayThrottlePercent': 123,
                'XRayErrorPercent': 123,
                'XRayRequestCount': 123,
                'XRayRequestAverageLatency': 123,
                'XRayNodeName': 'string',
                'XRayNodeType': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • RelatedObservations (dict) --

      Observations related to the problem.

      • ObservationList (list) --

        The list of observations related to the problem.

        • (dict) --

          Describes an anomaly or error with the application.

          • Id (string) --

            The ID of the observation type.

          • StartTime (datetime) --

            The time when the observation was first detected, in epoch seconds.

          • EndTime (datetime) --

            The time when the observation ended, in epoch seconds.

          • SourceType (string) --

            The source type of the observation.

          • SourceARN (string) --

            The source resource ARN of the observation.

          • LogGroup (string) --

            The log group name.

          • LineTime (datetime) --

            The timestamp in the CloudWatch Logs that specifies when the matched line occurred.

          • LogText (string) --

            The log text of the observation.

          • LogFilter (string) --

            The log filter of the observation.

          • MetricNamespace (string) --

            The namespace of the observation metric.

          • MetricName (string) --

            The name of the observation metric.

          • Unit (string) --

            The unit of the source observation metric.

          • Value (float) --

            The value of the source observation metric.

          • CloudWatchEventId (string) --

            The ID of the CloudWatch Event-based observation related to the detected problem.

          • CloudWatchEventSource (string) --

            The source of the CloudWatch Event.

          • CloudWatchEventDetailType (string) --

            The detail type of the CloudWatch Event-based observation, for example, EC2 Instance State-change Notification.

          • HealthEventArn (string) --

            The Amazon Resource Name (ARN) of the AWS Health Event-based observation.

          • HealthService (string) --

            The service to which the AWS Health Event belongs, such as EC2.

          • HealthEventTypeCode (string) --

            The type of the AWS Health event, for example, AWS_EC2_POWER_CONNECTIVITY_ISSUE.

          • HealthEventTypeCategory (string) --

            The category of the AWS Health event, such as issue.

          • HealthEventDescription (string) --

            The description of the AWS Health event provided by the service, such as Amazon EC2.

          • CodeDeployDeploymentId (string) --

            The deployment ID of the CodeDeploy-based observation related to the detected problem.

          • CodeDeployDeploymentGroup (string) --

            The deployment group to which the CodeDeploy deployment belongs.

          • CodeDeployState (string) --

            The status of the CodeDeploy deployment, for example SUCCESS or FAILURE.

          • CodeDeployApplication (string) --

            The CodeDeploy application to which the deployment belongs.

          • CodeDeployInstanceGroupId (string) --

            The instance group to which the CodeDeploy instance belongs.

          • Ec2State (string) --

            The state of the instance, such as STOPPING or TERMINATING.

          • XRayFaultPercent (integer) --

            The X-Ray request fault percentage for this node.

          • XRayThrottlePercent (integer) --

            The X-Ray request throttle percentage for this node.

          • XRayErrorPercent (integer) --

            The X-Ray request error percentage for this node.

          • XRayRequestCount (integer) --

            The X-Ray request count for this node.

          • XRayRequestAverageLatency (integer) --

            The X-Ray node request average latency for this node.

          • XRayNodeName (string) --

            The name of the X-Ray node.

          • XRayNodeType (string) --

            The type of the X-Ray node.

ListApplications (updated) Link ¶
Changes (response)
{'ApplicationInfoList': {'CWEMonitorEnabled': 'boolean'}}

Lists the IDs of the applications that you are monitoring.

See also: AWS API Documentation

Request Syntax

client.list_applications(
    MaxResults=123,
    NextToken='string'
)
type MaxResults:

integer

param MaxResults:

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

type NextToken:

string

param NextToken:

The token to request the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationInfoList': [
        {
            'ResourceGroupName': 'string',
            'LifeCycle': 'string',
            'OpsItemSNSTopicArn': 'string',
            'OpsCenterEnabled': True|False,
            'CWEMonitorEnabled': True|False,
            'Remarks': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ApplicationInfoList (list) --

      The list of applications.

      • (dict) --

        Describes the status of the application.

        • ResourceGroupName (string) --

          The name of the resource group used for the application.

        • LifeCycle (string) --

          The lifecycle of the application.

        • OpsItemSNSTopicArn (string) --

          The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS notifications for opsItem updates.

        • OpsCenterEnabled (boolean) --

          Indicates whether Application Insights will create opsItems for any problem detected by Application Insights for an application.

        • CWEMonitorEnabled (boolean) --

          Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

        • Remarks (string) --

          The issues on the user side that block Application Insights from successfully monitoring an application. Example remarks include:

          • “Configuring application, detected 1 Errors, 3 Warnings”

          • “Configuring application, detected 1 Unconfigured Components”

    • NextToken (string) --

      The token used to retrieve the next page of results. This value is null when there are no more results to return.

UpdateApplication (updated) Link ¶
Changes (request, response)
Request
{'CWEMonitorEnabled': 'boolean'}
Response
{'ApplicationInfo': {'CWEMonitorEnabled': 'boolean'}}

Updates the application.

See also: AWS API Documentation

Request Syntax

client.update_application(
    ResourceGroupName='string',
    OpsCenterEnabled=True|False,
    CWEMonitorEnabled=True|False,
    OpsItemSNSTopicArn='string',
    RemoveSNSTopic=True|False
)
type ResourceGroupName:

string

param ResourceGroupName:

[REQUIRED]

The name of the resource group.

type OpsCenterEnabled:

boolean

param OpsCenterEnabled:

When set to true, creates opsItems for any problems detected on an application.

type CWEMonitorEnabled:

boolean

param CWEMonitorEnabled:

Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

type OpsItemSNSTopicArn:

string

param OpsItemSNSTopicArn:

The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.

type RemoveSNSTopic:

boolean

param RemoveSNSTopic:

Disassociates the SNS topic from the opsItem created for detected problems.

rtype:

dict

returns:

Response Syntax

{
    'ApplicationInfo': {
        'ResourceGroupName': 'string',
        'LifeCycle': 'string',
        'OpsItemSNSTopicArn': 'string',
        'OpsCenterEnabled': True|False,
        'CWEMonitorEnabled': True|False,
        'Remarks': 'string'
    }
}

Response Structure

  • (dict) --

    • ApplicationInfo (dict) --

      Information about the application.

      • ResourceGroupName (string) --

        The name of the resource group used for the application.

      • LifeCycle (string) --

        The lifecycle of the application.

      • OpsItemSNSTopicArn (string) --

        The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS notifications for opsItem updates.

      • OpsCenterEnabled (boolean) --

        Indicates whether Application Insights will create opsItems for any problem detected by Application Insights for an application.

      • CWEMonitorEnabled (boolean) --

        Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

      • Remarks (string) --

        The issues on the user side that block Application Insights from successfully monitoring an application. Example remarks include:

        • “Configuring application, detected 1 Errors, 3 Warnings”

        • “Configuring application, detected 1 Unconfigured Components”