Skip to content

Commit

Permalink
Change alarm periods
Browse files Browse the repository at this point in the history
  • Loading branch information
tkgnm committed Nov 10, 2023
1 parent da5e756 commit bb9f716
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ Object {
"Ref": "AlarmTopicArn",
},
],
"Period": 60,
"Period": 3600,
"Statistic": "Sum",
"Threshold": 0,
"TreatMissingData": "breaching",
Expand Down Expand Up @@ -1006,7 +1006,7 @@ Object {
"Ref": "AlarmTopicArn",
},
],
"Period": 60,
"Period": 3600,
"Statistic": "Sum",
"Threshold": 0,
"TreatMissingData": "breaching",
Expand Down Expand Up @@ -1476,7 +1476,7 @@ Object {
"Ref": "AlarmTopicArn",
},
],
"Period": 60,
"Period": 86400,
"Statistic": "Sum",
"Threshold": 0,
"TreatMissingData": "breaching",
Expand Down Expand Up @@ -1946,7 +1946,7 @@ Object {
"Ref": "AlarmTopicArn",
},
],
"Period": 60,
"Period": 3600,
"Statistic": "Sum",
"Threshold": 0,
"TreatMissingData": "breaching",
Expand Down Expand Up @@ -2416,7 +2416,7 @@ Object {
"Ref": "AlarmTopicArn",
},
],
"Period": 60,
"Period": 86400,
"Statistic": "Sum",
"Threshold": 0,
"TreatMissingData": "breaching",
Expand Down
3 changes: 1 addition & 2 deletions notificationworkerlambda/cdk/lib/senderworker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ class SenderWorker extends cdkcore.Construct {
evaluationPeriods: 1,
threshold: 0,
// whole day for editions, 60 minutes for others
// metric: senderLambdaCtr.metricInvocations({period: cdk.Duration.seconds(props.dailyAlarmPeriod ? 60 * 60 * 24 : 60 * 60), statistic: "Sum"}),
metric: senderLambdaCtr.metricInvocations({period: cdk.Duration.seconds(60), statistic: "Sum"}),
metric: senderLambdaCtr.metricInvocations({period: cdk.Duration.seconds(props.dailyAlarmPeriod ? 60 * 60 * 24 : 60 * 60), statistic: "Sum"}),
treatMissingData: cloudwatch.TreatMissingData.BREACHING,
actionsEnabled: true // isEnabled
})
Expand Down

0 comments on commit bb9f716

Please sign in to comment.