Skip to content

Latest commit

 

History

History
576 lines (481 loc) · 15.7 KB

File metadata and controls

576 lines (481 loc) · 15.7 KB

English / 日本語

AWSCloudFormationTemplates/monitoring

Build Status GitHub GitHub release (latest by date)

AWSCloudFormationTemplates/monitoring provides CloudWatch alarm for major AWS services.

API Gateway

The template creates the following alarms.

Namespace MetricName ApiName Stage Threshold
AWS/ApiGateway 4XXError ApiName ApiStageName At least once a minute
AWS/ApiGateway 5XXError ApiName ApiStageName At least once a minute
AWS/ApiGateway Count ApiName ApiStageName ApiCount
AWS/ApiGateway Latency ApiName ApiStageName LatencyThreshold

You can provide optional parameters as follows.

Name Type Default Required Details
ApiMethodName GET / POST / DELETE / OPTIONS
ApiName String
ApiResourcePath String
ApiStageName String
CustomAlarmName String
ApiCount Number 0
LatencyThreshold Number 2000
SNSTopicArn String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    ApiMethodName : String
    ApiName : String
    ApiResourcePath : String
    ApiStageName : String
    CustomAlarmName : String
    ApiCount : Integer
    LatencyThreshold : Integer
    ApiMethodName : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/apigateway.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-apigateway
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    ApiMethodName : String
    ApiName : String
    ApiResourcePath : String
    ApiStageName : String
    CustomAlarmName : String
    ApiCount : Integer
    LatencyThreshold : Integer
    ApiMethodName : String
  Tags: Map
  TimeoutInMinutes: Integer

CodeBuild

The template creates the following alarms.

Namespace MetricName ProjectName Threshold
AWS/CodeBuild FailedBuilds ProjectName At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
ProjectName String
SNSTopicArn String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    ProjectName : String
    SNSTopicArn : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/codebuild.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-codebuild
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    ProjectName : String
    SNSTopicArn : String
  Tags: Map
  TimeoutInMinutes: Integer

DynamoDB throttle

The template creates the following alarms.

Namespace MetricName TableName Threshold
AWS/DynamoDB WriteThrottleEvents TableName At least once a minute
AWS/DynamoDB ReadThrottleEvents TableName At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
SNSTopicArn String
TableName String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    ProjectName : String
    SNSTopicArn : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/dynamodb-throttle.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-dynamodb-throttle
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    ProjectName : String
    SNSTopicArn : String
  Tags: Map
  TimeoutInMinutes: Integer

DynamoDB

The template creates the following alarms.

Namespace MetricName Operation Threshold
AWS/DynamoDB UserErrors GetRecords At least once a minute
AWS/DynamoDB SystemErrors GetRecords At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
SNSTopicArn String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    SNSTopicArn : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/dynamodb.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-dynamodb
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    SNSTopicArn : String
  Tags: Map
  TimeoutInMinutes: Integer

EC2

The template provide the following alarms.

Namespace MetricName Threshold
AWS/EC2 StatusCheckFailed At least once a minute
AWS/EC2 CPUUtilization CPUUtilizationThreshold

You can give optional parameters as follows.

Name Type Default Required Details
CPUUtilizationThreshold Number 100
CustomAlarmName String
SNSTopicArn String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CPUUtilizationThreshold: Integer
    CustomAlarmName : String
    SNSTopicArn : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/ec2.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-ec2
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CPUUtilizationThreshold: Integer
    CustomAlarmName : String
    SNSTopicArn : String
  Tags: Map
  TimeoutInMinutes: Integer

EventBridge

The template creates the following alarms.

Namespace MetricName RuleName Threshold
AWS/Events StatusCheckFailed FailedInvocations At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
EventsRuleName String
SNSTopicArn String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    EventsRuleName: String
    SNSTopicArn : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/events.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-events
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    EventsRuleName: String
    SNSTopicArn : String
  Tags: Map
  TimeoutInMinutes: Integer

Kinesis Streams

The template creates the following alarms.

Namespace MetricName StreamName Threshold
AWS/Kinesis GetRecords.IteratorAgeMilliseconds KinesisStreamName IteratorAgeMillisecondsThreshold
AWS/Kinesis PutRecord.Success KinesisStreamName NumberOfPutRecordThreshold
AWS/Kinesis WriteProvisionedThroughputExceeded KinesisStreamName At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
IteratorAgeMillisecondsThreshold Integer 30000
KinesisStreamName String
NumberOfPutRecordThreshold Integer 1000
SNSTopicArn String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    IteratorAgeMillisecondsThreshold: Integer
    KinesisStreamName : String
    NumberOfPutRecordThreshold : Integer
    SNSTopicArn : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/kinesis.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-kinesis
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    IteratorAgeMillisecondsThreshold: Integer
    KinesisStreamName : String
    NumberOfPutRecordThreshold : Integer
    SNSTopicArn : String
  Tags: Map
  TimeoutInMinutes: Integer

Lambda

The template creates the following alarms.

Namespace MetricName Resource FunctionName Threshold
AWS/Lambda Errors FunctionResouceName FunctionResouceName At least once a minute
AWS/Lambda ClientError FunctionResouceName FunctionResouceName At least once a minute
AWS/Lambda TypeError FunctionResouceName FunctionResouceName At least once a minute
AWS/Lambda Duration FunctionResouceName FunctionResouceName TimeoutMilliseconds
AWS/Lambda Throttles FunctionResouceName FunctionResouceName At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
FunctionResouceName String
MetricFilterPattern String ?Error ?Exception Metric filter pattern
SNSTopicArn String
TimeoutMilliseconds Integer 24000

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    FunctionResouceName: String
    SNSTopicArn : String
    TimeoutMilliseconds: Integer
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/lambda.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-lambda
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    FunctionResouceName: String
    SNSTopicArn : String
    TimeoutMilliseconds: Integer
  Tags: Map
  TimeoutInMinutes: Integer

NAT Gateway

The template creates the following alarms.

Namespace MetricName Threshold
AWS/NATGateway PacketsDropCount At least once a minute
AWS/NATGateway ErrorPortAllocation At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
SNSTopicArn String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    SNSTopicArn : String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/natgateway.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-natgateway
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    SNSTopicArn : String
  Tags: Map
  TimeoutInMinutes: Integer

SNS

The template creates the following alarms.

Namespace MetricName TopicName Threshold
AWS/SNS NumberOfNotificationsFailed SNSTopicName At least once a minute

You can provide optional parameters as follows.

Name Type Default Required Details
CustomAlarmName String
SNSTopicArn String
SNSTopicName String

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::CloudFormation::Stack
Properties: 
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    SNSTopicArn : String
    SNSTopicName: String
  Tags: 
    - Tag
  TemplateURL: !If
        - Development
        - https://s3.amazonaws.com/eijikominami-test/aws-cloudformation-templates/monitoring/sns.yaml
  TimeoutInMinutes: Integer
Type: 'AWS::Serverless::Application'
Properties:
  Location:
    ApplicationId: arn:aws:serverlessrepo:us-east-1:172664222583:applications/cloudwatch-alarm-about-sns
    SemanticVersion: 1.3.12
  NotificationARNs: 
    - String
  Parameters: 
    CustomAlarmName : String
    SNSTopicArn : String
    SNSTopicName: String
  Tags: Map
  TimeoutInMinutes: Integer

Architecture

The following sections describe the individual components of the architecture.