Skip to main content

What’s New

Qrvey 9.1
Qrvey Version 9.1 is now available! This release introduces numerous features, enhancements, bug fixes, and performance improvements.
Learn More
Qrvey 9.0
Qrvey Version 9.0 is now available! This release introduces multi-platform hosting (Azure & AWS), a redesigned Dashboard, extensive widget customizations, and numerous features, enhancements, bug fixes, and performance improvements.
Learn More
Qrvey 8.8
Qrvey Version 8.8 (LTS) is now available to customers! This version supports FIPS for GovCloud and includes tons of bug fixes and performance improvements.
Learn More
Qrvey 8.7
Version 8.7 of the Qrvey platform is now available to customers! This version includes new features including area charts, the ability to pivot and export data, as well as numerous bug fixes and performance improvements.
Learn More
Qrvey 8.6
Version 8.6 of the Qrvey platform is now available to customers. This version includes several new feature enhancements and performance improvements.
Learn More
Required Update for 8.5.1
Attention 8.5.1 customers: for any 8.5.1 instance deployed prior to 08/05/2024, an update is required to ensure you are running the latest images.
Learn More
Qrvey 8.5
Version 8.5 (LTS) of the Qrvey platform is now available to customers. This version includes several new features and performance improvements.
Learn More
End-of-life Schedule
We've added a new article that lists the features and endpoints that have been scheduled for deprecation. All features and endpoints will be supported for (1) year after the release date of the LTS version that contains the alternative.
Learn More
Version: 9.1

CloudWatch Alarms

QRVEY recommends that customers define CloudWatch alarms to monitor the most important QRVEY APP services.

Step-by-step: Deploying the YAML File

  1. Go to the CloudFormation service.
  2. Click Create Stack to create a new CloudFormation stack.
  3. Select Upload a template file (a sample template is provided below), click Choose file, select AlarmsTemplate.yml, and click Next.
  4. In Specify stack details, enter:
    • Stack Name: QrveyAlarmSystem
    • ElasticSearchDomainName: qrvey-XXXXX (replace XXXXX with your Qrvey environment prefix)
    • Email1: Customer email address to receive alerts
    • Prefix: Qrvey environment prefix
  5. Click Next, then Next again.
  6. Click Submit to create the stack.
  7. Wait for the stack creation to complete. Then, check your email and confirm the subscription to receive alerts.

Activating ECS Container Insights (AlarmSystem v1.9)

  1. Go to the ECS service and select the ECS cluster qrvey-XXXXX-microservices.
  2. Click Update Cluster.
  3. Under Monitoring, enable Use Container Insights.

Verifying CloudWatch Alarms

  1. Go to the CloudWatch service.
  2. Navigate to Alarms > All alarms.
  3. In the search box, type running. You should see 5 or 6 alarms deployed (depending on the Qrvey version).

Sample Template

AWSTemplateFormatVersion: '2010-09-09'
Description: Stack Alarms for Qrvey New Version 1.9. Admin Serverless
Parameters:
ECSARN:
Description: ECS Cluster ARN
Type: String
MinLength: 1
MaxLength: 2048
ConstraintDescription: Must add the ARN of the ECS Cluster to be monitored
Email1:
Description: The email address where notifications are sent
Type: String
MinLength: 1
MaxLength: 2048
ConstraintDescription: Must add email to be notified
Email2:
Description: Optional email address for notifications
Type: String
Prefix:
Type: String
AllowedPattern: "[a-zA-Z0-9]*"
MinLength: 1
MaxLength: 2048
ConstraintDescription: Must contain only alphanumeric characters
EstimatedCharges:
Description: Estimated charges threshold. Leave as 0 to disable this alarm.
Type: Number
Default: 0
ElasticSearchDomainName:
Description: Name of the ElasticSearch Domain
Type: String
MinLength: 0
MaxLength: 2048
ConstraintDescription: Must contain only alphanumeric characters
ElasticSearchPercentageDisk:
Description: 'Percentage Disk Usage'
Default: 20
Type: Number
MinValue: 20
MaxValue: 100
ConstraintDescription: Can't be lower than 20%
PeriodlambdaErrors:
Description: 'Period for Lambda Alarm'
Default: 300
Type: Number
ThresholdlambdaErrors:
Description: 'Threshold for Lambda errors'
Default: 15
Type: Number
ThresholdlambdaThrottles:
Description: 'Threshold for Lambda throttles'
Default: 0
Type: Number
ThresholdESCPUutilization:
Description: 'Threshold for CPU Utilization in ES'
Default: 80
Type: Number
MinValue: 1
MaxValue: 100
ThresholdJVMMemoryPressure:
Description: 'Threshold for Memory Utilization in ES Services'
Default: 75
Type: Number
MinValue: 1
MaxValue: 100
ThresholdESCPUutilizationECS:
Description: 'Threshold for CPU Utilization in ECS'
Default: 80
Type: Number
MinValue: 1
MaxValue: 100
ThresholdMemoryutilizationECS:
Description: 'Threshold for Memory Utilization in ECS Services'
Default: 80
Type: Number
MinValue: 1
MaxValue: 100
Conditions:
CreateChargeAlarm: !Not [!Equals [!Ref EstimatedCharges, 0]]
CreateSubscription: !Not [!Equals [!Ref Email2, '']]
ESDomainName: !Not [!Equals [!Ref ElasticSearchDomainName, '']]
CreateLambdaAlarm1: !Not [!Equals [!Ref ThresholdlambdaErrors, 0]]
CreateLambdaAlarm2: !Not [!Equals [!Ref ThresholdlambdaThrottles, 0]]

Resources:
SNSTopic:
Type: AWS::SNS::Topic
EmailSubscription1:
Type: AWS::SNS::Subscription
Properties:
Endpoint: !Ref Email1
Protocol: email
TopicArn: !Ref SNSTopic
EmailSubscription2:
Type: AWS::SNS::Subscription
Condition: CreateSubscription
Properties:
Endpoint: !Ref Email2
Protocol: email
TopicArn: !Ref SNSTopic

# ElasticSearch Alarms
ClusterStatusYellowAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: Replica shards for at least one index are not allocated to nodes in a cluster.
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: ClusterStatus.yellow
Namespace: AWS/ES
Statistic: Maximum
Period: 60
EvaluationPeriods: 5
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: 1
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
ClusterStatusRedAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: Replica shards for at least one index are not allocated to nodes in a cluster.
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: ClusterStatus.red
Namespace: AWS/ES
Statistic: Maximum
Period: 60
EvaluationPeriods: 5
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: 1
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
MasterReachableFromNodeAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: Failures mean that the master node stopped or is not reachable. They are usually the result of a network connectivity issue or AWS dependency problem.
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: MasterReachableFromNode
Namespace: AWS/ES
Statistic: Maximum
Period: 60
EvaluationPeriods: 5
ComparisonOperator: LessThanOrEqualToThreshold
Threshold: 0
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
ClusterPercentageStorageAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
Metrics:
- Id: m1
MetricStat:
Metric:
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: FreeStorageSpace
Namespace: AWS/ES
Period: 300
Stat: Maximum
ReturnData: False
- Id: m2
MetricStat:
Metric:
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: ClusterUsedSpace
Namespace: AWS/ES
Period: 300
Stat: Maximum
ReturnData: False
- Id: expr1
Expression: (m1/(m1+(m2/2)))*100
Label: StoragePercentageFree
AlarmActions:
- !Ref SNSTopic
AlarmDescription: A node in your cluster is down to 20 GiB of free storage space.
EvaluationPeriods: 2
ComparisonOperator: LessThanThreshold
Threshold: 20
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
ClusterWritesBlockedAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: Cluster is blocking write requests.
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: ClusterIndexWritesBlocked
Namespace: AWS/ES
Statistic: Maximum
Period: 300
EvaluationPeriods: 1
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: 1
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
NodesQuantityAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: If nodes is less than 1
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: Nodes
Namespace: AWS/ES
Statistic: Minimum
Period: 300
EvaluationPeriods: 1
ComparisonOperator: LessThanThreshold
Threshold: 1
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
AutomatedSnapshotFailureAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: An automated snapshot failed.
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: AutomatedSnapshotFailure
Namespace: AWS/ES
Statistic: Average
Period: 60
EvaluationPeriods: 1
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: 1
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
CPUUtilizationAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: Cluster CPU Utilization.
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: CPUUtilization
Namespace: AWS/ES
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdESCPUutilization
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
JVMMemoryPressureAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: JVM Memory Pressure.
Dimensions:
- Name: ClientId
Value: !Ref AWS::AccountId
- Name: DomainName
Value: !If [ESDomainName, !Ref ElasticSearchDomainName, !Sub 'qrvey-${Prefix}']
MetricName: JVMMemoryPressure
Namespace: AWS/ES
Statistic: Average
Period: 300
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdJVMMemoryPressure
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching

# Lambda Alarms
LambdaErrorsAlarm:
Type: AWS::CloudWatch::Alarm
Condition: CreateLambdaAlarm1
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: Notified if any Lambda errors occur.
MetricName: Errors
Namespace: AWS/Lambda
Statistic: Maximum
Period: !Ref PeriodlambdaErrors
EvaluationPeriods: 1
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdlambdaErrors
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
LambdaThrottlesAlarm:
Type: AWS::CloudWatch::Alarm
Condition: CreateLambdaAlarm2
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: Notified if throttles occur.
MetricName: Throttles
Namespace: AWS/Lambda
Statistic: Maximum
Period: 60
EvaluationPeriods: 1
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdlambdaThrottles
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching

# ECS Alarms
CPUUtilizationAlarmECSService1:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_job_service CPU Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_job_service'
MetricName: CPUUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdESCPUutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
CPUUtilizationAlarmECSService2:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_worker_service CPU Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_worker_service'
MetricName: CPUUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdESCPUutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
CPUUtilizationAlarmECSService3:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_monolithic_service CPU Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_monolithic_service'
MetricName: CPUUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdESCPUutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
CPUUtilizationAlarmECSService4:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_core_service CPU Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_core_service'
MetricName: CPUUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdESCPUutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
CPUUtilizationAlarmECSService5:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_analytics_service CPU Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_analytics_service'
MetricName: CPUUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdESCPUutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
CPUUtilizationAlarmECSService6:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_builder_service CPU Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_builder_service'
MetricName: CPUUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdESCPUutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
MemoryUtilizationAlarmECSService1:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_job_service Memory Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_job_service'
MetricName: MemoryUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdMemoryutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
MemoryUtilizationAlarmECSService2:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_worker_service Memory Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_worker_service'
MetricName: MemoryUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdMemoryutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
MemoryUtilizationAlarmECSService3:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_monolithic_service Memory Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_monolithic_service'
MetricName: MemoryUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdMemoryutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
MemoryUtilizationAlarmECSService4:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_core_service Memory Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_core_service'
MetricName: MemoryUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdMemoryutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
MemoryUtilizationAlarmECSService5:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_analytics_service Memory Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_analytics_service'
MetricName: MemoryUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdMemoryutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching
MemoryUtilizationAlarmECSService6:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: !Sub 'Service ${Prefix}_qrvey_builder_service Memory Utilization.'
Dimensions:
- Name: ClusterName
Value: !Sub 'qrvey-${Prefix}-microservices'
- Name: ServiceName
Value: !Sub '${Prefix}_qrvey_builder_service'
MetricName: MemoryUtilization
Namespace: AWS/ECS
Statistic: Average
Period: 900
EvaluationPeriods: 3
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref ThresholdMemoryutilizationECS
InsufficientDataActions:
- !Ref SNSTopic
TreatMissingData: notBreaching

# DynamoDB Alarms
DynamoUserErrorsAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: This alarm indicates a client-side error, such as an invalid combination of parameters, an attempt to update a nonexistent table, or an incorrect request signature.
MetricName: UserErrors
Namespace: AWS/DynamoDB
Statistic: Sum
Period: 300
EvaluationPeriods: 1
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: 10
TreatMissingData: notBreaching
DynamoSystemErrorsAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: This alarm indicates when requests to DynamoDB failed.
MetricName: SystemErrors
Namespace: AWS/DynamoDB
Statistic: Sum
Period: 60
EvaluationPeriods: 1
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: 1
TreatMissingData: notBreaching

# Billing Alarm
EstimatedChargesAlarm:
Type: AWS::CloudWatch::Alarm
Condition: CreateChargeAlarm
Properties:
AlarmActions:
- !Ref SNSTopic
AlarmDescription: This alarm indicates when estimated charges exceed the threshold.
MetricName: EstimatedCharges
Dimensions:
- Name: Currency
Value: USD
Namespace: AWS/Billing
Statistic: Maximum
Period: 21600
EvaluationPeriods: 1
ComparisonOperator: GreaterThanOrEqualToThreshold
Threshold: !Ref EstimatedCharges

# Rules for AWS Health
HealthCodeBuildEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when a CodeBuild issue occurs"
EventPattern:
source:
- "aws.health"
detail-type:
- "AWS Health Event"
detail:
service:
- "CODEBUILD"
eventTypeCategory:
- "issue"
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"
HealthDynamoEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when a DynamoDB issue occurs"
EventPattern:
source:
- "aws.health"
detail-type:
- "AWS Health Event"
detail:
service:
- "DYNAMODB"
eventTypeCategory:
- "issue"
eventTypeCode:
- "AWS_DYNAMODB_OPERATIONAL_ISSUE"
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"
HealthS3EventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when an S3 issue occurs"
EventPattern:
source:
- "aws.health"
detail-type:
- "AWS Health Event"
detail:
service:
- "S3"
eventTypeCategory:
- "issue"
eventTypeCode:
- "AWS_S3_OPERATIONAL_ISSUE"
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"
HealthECSEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when an ECS issue occurs"
EventPattern:
source:
- "aws.health"
detail-type:
- "AWS Health Event"
detail:
service:
- "ECS"
eventTypeCategory:
- "issue"
eventTypeCode:
- "AWS_ECS_OPERATIONAL_ISSUE"
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"

ECSStoppedEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when an ECS task stops"
EventPattern:
source:
- "aws.ecs"
detail-type:
- "ECS Task State Change"
detail:
lastStatus:
- "STOPPED"
clusterArn:
- !Ref ECSARN
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"

ECSZeroTasksEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when an ECS task is running"
EventPattern:
source:
- "ecs.task-state-change"
detail-type:
- "ECS Task State Change"
detail:
lastStatus:
- "RUNNING"
desiredStatus:
- "RUNNING"
clusterArn:
- !Ref ECSARN
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"

HealthCloudfrontEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when a CloudFront issue occurs"
EventPattern:
source:
- "aws.health"
detail-type:
- "AWS Health Event"
detail:
service:
- "CLOUDFRONT"
eventTypeCategory:
- "issue"
eventTypeCode:
- "AWS_CLOUDFRONT_OPERATIONAL_ISSUE"
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"
HealthLambdaEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when a Lambda issue occurs"
EventPattern:
source:
- "aws.health"
detail-type:
- "AWS Health Event"
detail:
service:
- "LAMBDA"
eventTypeCategory:
- "issue"
eventTypeCode:
- "AWS_LAMBDA_OPERATIONAL_ISSUE"
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"
HealthElasticSearchEventRule:
Type: AWS::Events::Rule
Properties:
Description: "Event to trigger notification when an ElasticSearch issue occurs"
EventPattern:
source:
- "aws.health"
detail-type:
- "AWS Health Event"
detail:
service:
- "ES"
eventTypeCategory:
- "issue"
eventTypeCode:
- "AWS_ES_OPERATIONAL_ISSUE"
- "AWS_ES_SCALE_UP_REQUIRED"
- "AWS_ES_DOMAIN_UNAVAILABLE"
State: "ENABLED"
Targets:
-
Arn: !Ref SNSTopic
Id: "SNSTopic"