Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spire/templates/dovetail-redis/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Resources:
Properties:
AlarmName: !Sub WARN [Common] Redis <${EnvironmentTypeAbbreviation}> HIGH MEMORY USAGE
AlarmDescription: !Sub >-
${EnvironmentType} shared Redis's database memory usage has exceeded
${EnvironmentType} Dovetail Redis's database memory usage has exceeded
the recommended safe level
ComparisonOperator: GreaterThanThreshold
EvaluationPeriods: 2
Expand Down Expand Up @@ -135,7 +135,7 @@ Resources:
Properties:
AlarmName: !Sub ERROR [Common] Redis <${EnvironmentTypeAbbreviation}> VERY HIGH MEMORY USAGE
AlarmDescription: !Sub >-
${EnvironmentType} shared Redis's database memory usage has reached a
${EnvironmentType} Dovetail Redis's database memory usage has reached a
critically high level
ComparisonOperator: GreaterThanThreshold
EvaluationPeriods: 2
Expand Down
79 changes: 79 additions & 0 deletions spire/templates/shared-app-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,85 @@ Resources:
- { Key: prx:dev:application, Value: Common }
TransitEncryptionEnabled: true

RedisMemoryLowAlarm:
Type: AWS::CloudWatch::Alarm
Condition: IsPrimaryRegion
Properties:
AlarmName: !Sub WARN [Common] App Redis <${EnvironmentTypeAbbreviation}> HIGH MEMORY USAGE
AlarmDescription: !Sub >-
${EnvironmentType} shared app Redis's database memory usage has
exceeded the recommended safe level
ComparisonOperator: GreaterThanThreshold
EvaluationPeriods: 2
Metrics:
- Id: node1
MetricStat:
Metric:
Dimensions:
- Name: CacheClusterId
Value: !Sub ${SharedAppRedisReplicationGroup}-001
- Name: CacheNodeId
Value: "0001"
MetricName: DatabaseMemoryUsagePercentage
Namespace: AWS/ElastiCache
Period: 120
Stat: Maximum
Unit: Percent
ReturnData: false
- Id: max
Expression: "MAX(METRICS())"
ReturnData: true
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
- { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
- { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
- { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
- { Key: prx:ops:environment, Value: !Ref EnvironmentType }
- { Key: prx:dev:application, Value: Common }
Threshold: 85
TreatMissingData: notBreaching

RedisMemoryVeryLowAlarm:
Type: AWS::CloudWatch::Alarm
Condition: IsPrimaryRegion
Properties:
AlarmName: !Sub ERROR [Common] App Redis <${EnvironmentTypeAbbreviation}> VERY HIGH MEMORY USAGE
AlarmDescription: !Sub >-
${EnvironmentType} shared app Redis's database memory usage has reached
a critically high level
ComparisonOperator: GreaterThanThreshold
EvaluationPeriods: 2
Metrics:
- Id: node1
MetricStat:
Metric:
Dimensions:
- Name: CacheClusterId
Value: !Sub ${SharedAppRedisReplicationGroup}-001
- Name: CacheNodeId
Value: "0001"
MetricName: DatabaseMemoryUsagePercentage
Namespace: AWS/ElastiCache
Period: 120
Stat: Maximum
Unit: Percent
ReturnData: false
- Id: max
Expression: "MAX(METRICS())"
ReturnData: true
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
- { Key: prx:cloudformation:stack-id, Value: !Ref AWS::StackId }
- { Key: prx:cloudformation:root-stack-name, Value: !Ref RootStackName }
- { Key: prx:cloudformation:root-stack-id, Value: !Ref RootStackId }
- { Key: prx:ops:environment, Value: !Ref EnvironmentType }
- { Key: prx:dev:application, Value: Common }
Threshold: 93
TreatMissingData: notBreaching


Outputs:
CacheName:
Value: !If [IsPrimaryRegion, !Ref SharedAppRedisReplicationGroup, ""]
Expand Down