cfn-guardian 0.8.3 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c854838ed3bed97742567309c39c64857cb78b5a981e3c0bdbf432524fad5c2f
4
- data.tar.gz: c8fb9e53f526c3b890c39511066220f682f0e9dc9538191152a24e4e1e53ae9f
3
+ metadata.gz: 0b6ceb0fb842b5d52ef3c36533bc77be47aeecc9f7aa358845fe8ec3a716e838
4
+ data.tar.gz: f902b5a1ade88029205fe6dce4b3729a300a1539ee1cef0cc81d2fb9f3bc1e6e
5
5
  SHA512:
6
- metadata.gz: 9fe7dbe3ab7dc50d53c338d8e3af132ce40208866ebde6d340df453fa0507f4d9e0e670c8b61493f73d0e843a412b9feedbd7bbff77c8a2d8c97fc7f80b5d235
7
- data.tar.gz: 64c8db0b35c14206263961e943af3bc38ebaf24a08bf21f598b38541f9603227bb4a538829f43220f04610bdb7e7ed23fd8de6ad1f83d68957c05c38cf5aa4f0
6
+ metadata.gz: cae989c263e5625f069c3f6941290ded67b9d46323ae806b395bcea6f5b2e99bf5e637b8869fc05f7dc62f1ab3345e4912d3d8ae5b8b1fc6d77b52864d74726b
7
+ data.tar.gz: 6a6e68d8ab85bf219af792fa0759059f921de279b408163d54f96e059464208073fc4e78aa1fd8e62fed67a5b921d51abf3f265da4a092d149a97403f2dfbe39
@@ -299,11 +299,14 @@ module CfnGuardian
299
299
  end
300
300
 
301
301
  class ElasticFileSystemAlarm < BaseAlarm
302
- def initialize(resource)
302
+ def initialize(resource, storage_class = nil)
303
303
  super(resource)
304
304
  @group = 'ElasticFileSystem'
305
305
  @namespace = 'AWS/EFS'
306
306
  @dimensions = { FileSystemId: resource['Id'] }
307
+ unless storage_class.nil?
308
+ @dimensions[:StorageClass] = storage_class
309
+ end
307
310
  end
308
311
  end
309
312
 
@@ -21,11 +21,12 @@ module CfnGuardian::Resource
21
21
  @alarms.push(alarm)
22
22
 
23
23
  alarm = CfnGuardian::Models::ApplicationTargetGroupAlarm.new(@resource)
24
+ alarm.enabled = false
24
25
  alarm.name = 'TargetResponseTime'
25
26
  alarm.metric_name = 'TargetResponseTime'
27
+ alarm.extended_statistic = 'p95'
26
28
  alarm.threshold = 5
27
29
  alarm.evaluation_periods = 5
28
- alarm.treat_missing_data = 'notBreaching'
29
30
  @alarms.push(alarm)
30
31
  end
31
32
 
@@ -22,6 +22,18 @@ module CfnGuardian
22
22
  alarm.treat_missing_data = 'notBreaching'
23
23
  alarm.datapoints_to_alarm = 5
24
24
  @alarms.push(alarm)
25
+
26
+ alarm = CfnGuardian::Models::ElasticFileSystemAlarm.new(@resource, 'Total')
27
+ alarm.name = 'TotalStorageUsed'
28
+ alarm.metric_name = 'StorageBytes'
29
+ alarm.comparison_operator = 'GreaterThanThreshold'
30
+ alarm.threshold = 10000000000 # 10GB default
31
+ alarm.evaluation_periods = 60
32
+ alarm.treat_missing_data = 'notBreaching'
33
+ alarm.datapoints_to_alarm = 30
34
+ alarm.alarm_action = 'Task'
35
+ alarm.enabled = false
36
+ @alarms.push(alarm)
25
37
  end
26
38
  end
27
39
  end
@@ -7,6 +7,13 @@ module CfnGuardian::Resource
7
7
  event_subscription.rds_event_category = 'failover'
8
8
  event_subscription.message = 'A failover for the DB cluster has failed.'
9
9
  @event_subscriptions.push(event_subscription)
10
+
11
+ event_subscription = CfnGuardian::Models::RDSClusterEventSubscription.new(@resource)
12
+ event_subscription.name = 'FailoverFinished'
13
+ event_subscription.rds_event_category = 'failover'
14
+ event_subscription.message = 'A failover for the DB cluster has finished.'
15
+ event_subscription.enabled = false
16
+ @event_subscriptions.push(event_subscription)
10
17
  end
11
18
 
12
19
  end
@@ -1,4 +1,4 @@
1
1
  module CfnGuardian
2
- VERSION = "0.8.3"
2
+ VERSION = "0.8.6"
3
3
  CHANGE_SET_VERSION = VERSION.gsub('.', '-').freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-guardian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guslington
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-31 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor