Created
April 13, 2023 15:11
-
-
Save mshakhomirov/0bf21eacfc8dbe3de4880044c16976f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlarmNotificationTopic: | |
Type: AWS::SNS::Topic | |
Properties: | |
Subscription: | |
- Endpoint: | |
Ref: Email | |
Protocol: email | |
PipelineManagerLambdaLogGroup: | |
DeletionPolicy: Delete | |
Type: AWS::Logs::LogGroup | |
Properties: | |
RetentionInDays: 7 | |
LogGroupName: /aws/lambda/pipeline-manager | |
PipelineManagerLambdaERRORMetricFilter: | |
Type: 'AWS::Logs::MetricFilter' | |
DependsOn: PipelineManagerLambdaLogGroup | |
Properties: | |
LogGroupName: /aws/lambda/pipeline-manager | |
FilterPattern: ?ERROR ?Error ?error ?undefined | |
MetricTransformations: | |
- MetricValue: '1' | |
MetricNamespace: pipeline-manager # !Ref ServiceName | |
MetricName: ERRORCount | |
PipelineManagerLambdaERRORMetricAlarm: | |
Type: 'AWS::CloudWatch::Alarm' | |
DependsOn: PipelineManagerLambdaERRORMetricFilter | |
Properties: | |
AlarmDescription: Trigger a the number ERROR greater than 5 for 5 consecutive minutes. | |
Namespace: pipeline-manager # !Ref ServiceName | |
MetricName: ERRORCount | |
Statistic: Sum | |
Period: '60' | |
EvaluationPeriods: '5' | |
ComparisonOperator: GreaterThanThreshold | |
Threshold: '0' | |
AlarmActions: | |
- !Ref AlarmNotificationTopic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment