From 15013d21f88f01068872eca7cab87df3c6d384a9 Mon Sep 17 00:00:00 2001 From: mjonesbase2 Date: Tue, 2 Aug 2022 13:01:24 +1000 Subject: [PATCH 1/4] alter targetresponsetime to metspec suggestions --- lib/cfnguardian/resources/application_targetgroup.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/cfnguardian/resources/application_targetgroup.rb b/lib/cfnguardian/resources/application_targetgroup.rb index c4d7101..537a3fe 100644 --- a/lib/cfnguardian/resources/application_targetgroup.rb +++ b/lib/cfnguardian/resources/application_targetgroup.rb @@ -23,9 +23,12 @@ def default_alarms alarm = CfnGuardian::Models::ApplicationTargetGroupAlarm.new(@resource) alarm.name = 'TargetResponseTime' alarm.metric_name = 'TargetResponseTime' - alarm.threshold = 5 + alarm.threshold = 30 alarm.evaluation_periods = 5 - alarm.treat_missing_data = 'notBreaching' + alarm.period = 60 + alarm.unit - 'Seconds' + alarm.alarm_action = 'Warningg' + alarm.treat_missing_data = 'missing' @alarms.push(alarm) end From 0d47fc24537f3e988d1bc539a762ad80b51d3b8a Mon Sep 17 00:00:00 2001 From: mjonesbase2 Date: Tue, 2 Aug 2022 13:06:51 +1000 Subject: [PATCH 2/4] fix spelling --- lib/cfnguardian/resources/application_targetgroup.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cfnguardian/resources/application_targetgroup.rb b/lib/cfnguardian/resources/application_targetgroup.rb index 537a3fe..bab3797 100644 --- a/lib/cfnguardian/resources/application_targetgroup.rb +++ b/lib/cfnguardian/resources/application_targetgroup.rb @@ -27,7 +27,7 @@ def default_alarms alarm.evaluation_periods = 5 alarm.period = 60 alarm.unit - 'Seconds' - alarm.alarm_action = 'Warningg' + alarm.alarm_action = 'Warning' alarm.treat_missing_data = 'missing' @alarms.push(alarm) end From e4f1904d34edddec7fa03b6597ad85fcd03990f3 Mon Sep 17 00:00:00 2001 From: mjonesbase2 Date: Tue, 2 Aug 2022 13:44:55 +1000 Subject: [PATCH 3/4] remove unit and treat missing data properties --- lib/cfnguardian/resources/application_targetgroup.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/cfnguardian/resources/application_targetgroup.rb b/lib/cfnguardian/resources/application_targetgroup.rb index bab3797..fbfa551 100644 --- a/lib/cfnguardian/resources/application_targetgroup.rb +++ b/lib/cfnguardian/resources/application_targetgroup.rb @@ -26,9 +26,7 @@ def default_alarms alarm.threshold = 30 alarm.evaluation_periods = 5 alarm.period = 60 - alarm.unit - 'Seconds' alarm.alarm_action = 'Warning' - alarm.treat_missing_data = 'missing' @alarms.push(alarm) end From 0313e0455d7ba0ddf08ff9134a33a9155e34d84c Mon Sep 17 00:00:00 2001 From: mjonesbase2 Date: Wed, 3 Aug 2022 10:07:18 +1000 Subject: [PATCH 4/4] remove period property --- lib/cfnguardian/resources/application_targetgroup.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/cfnguardian/resources/application_targetgroup.rb b/lib/cfnguardian/resources/application_targetgroup.rb index fbfa551..9c956b9 100644 --- a/lib/cfnguardian/resources/application_targetgroup.rb +++ b/lib/cfnguardian/resources/application_targetgroup.rb @@ -25,7 +25,6 @@ def default_alarms alarm.metric_name = 'TargetResponseTime' alarm.threshold = 30 alarm.evaluation_periods = 5 - alarm.period = 60 alarm.alarm_action = 'Warning' @alarms.push(alarm) end