Skip to content

Commit 4603f7f

Browse files
committed
update error alarms
1 parent cc44f43 commit 4603f7f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

cicd/3-app/javabuilder/template.yml.erb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,10 @@ Resources:
694694
MetricStat:
695695
Metric:
696696
Namespace: Javabuilder
697-
MetricName: Javabuilder <%=name%> "SEVERE" errors
697+
MetricName: SevereError
698+
Dimensions:
699+
- Name: functionName
700+
Value: !Ref BuildAndRunJava<%=name%>ProjectFunction
698701
Period: 300
699702
Stat: Sum
700703
- Id: m2
@@ -728,7 +731,7 @@ Resources:
728731
- Id: e1
729732
Label: Errors / Invocations
730733
ReturnData: true
731-
Expression: (m1 / m2) * 100
734+
Expression: ((m1 - m3) / m2) * 100
732735
- Id: m1
733736
ReturnData: false
734737
MetricStat:
@@ -751,6 +754,17 @@ Resources:
751754
Value: !Ref BuildAndRunJava<%=name%>ProjectFunction
752755
Period: 300
753756
Stat: Sum
757+
- Id: m3
758+
ReturnData: false
759+
MetricStat:
760+
Metric:
761+
Namespace: AWS/Lambda
762+
MetricName: Duration
763+
Dimensions:
764+
- Name: FunctionName
765+
Value: !Ref BuildAndRunJava<%=name%>ProjectFunction
766+
Period: 300
767+
Stat: TC(89000:)
754768
755769
<%=name%>SlowCleanupTimeAlarm:
756770
Type: AWS::CloudWatch::Alarm

0 commit comments

Comments
 (0)