cfn_monitor 0.3.0 → 0.3.1

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: f82fba1b0a02e6030b91b9edda8a57a64521771cec555774f454d5f744e7b90a
4
- data.tar.gz: e5418101905069220eee2c3f2125be30a6082544bec2767297ef4e42b457a287
3
+ metadata.gz: 5eb7a9ec110ec59c924741f75f73f51fe4adcfd8e721607f25161c4591173dbc
4
+ data.tar.gz: a75e7a68d8be164a3792d1588fe12b707be29df411986ea929fca972b5e10032
5
5
  SHA512:
6
- metadata.gz: '0186c8bc6f63540f48798cc32a1947bf36279226600ba758834155ba3a9e5ad574f4877972681d781969f10dab08aabb0dba2388d712d64ef7cabf79d6212ee7'
7
- data.tar.gz: 00ac7ac7ceae22e0828ef760805799079a362f076e7f694ce097306a26e07f3b8a2c5f446e52b2bbebe7315b482e653abb9d666218f10e028cfc91d2429a0c8c
6
+ metadata.gz: f9ba5341adf013866a399c30ab6279b54a2c0007796c927f45a3643d245b7de985312c32bec7c34388ed521a5f9031314e669b6dac2c294d9f5d8714ae398a69
7
+ data.tar.gz: 3debd964f85d66c8f80c1046b266aca364793eeb8e997b0d2c7b7d50ea819da3ed4804ca5c4e1bcc6b65e1c3b0c28444ec0dc719c9f8e033a482e2f241884fbf
data/Gemfile.lock ADDED
@@ -0,0 +1,65 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cfn_monitor (0.3.1)
5
+ aws-sdk-cloudformation (~> 1, < 2)
6
+ aws-sdk-elasticloadbalancingv2 (~> 1, < 2)
7
+ aws-sdk-s3 (~> 1, < 2)
8
+ cfndsl (~> 0.16)
9
+ thor (~> 0.19)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ aws-eventstream (1.0.2)
15
+ aws-partitions (1.147.0)
16
+ aws-sdk-cloudformation (1.18.0)
17
+ aws-sdk-core (~> 3, >= 3.48.2)
18
+ aws-sigv4 (~> 1.1)
19
+ aws-sdk-core (3.48.3)
20
+ aws-eventstream (~> 1.0, >= 1.0.2)
21
+ aws-partitions (~> 1.0)
22
+ aws-sigv4 (~> 1.1)
23
+ jmespath (~> 1.0)
24
+ aws-sdk-elasticloadbalancingv2 (1.26.0)
25
+ aws-sdk-core (~> 3, >= 3.48.2)
26
+ aws-sigv4 (~> 1.1)
27
+ aws-sdk-kms (1.16.0)
28
+ aws-sdk-core (~> 3, >= 3.48.2)
29
+ aws-sigv4 (~> 1.1)
30
+ aws-sdk-s3 (1.36.0)
31
+ aws-sdk-core (~> 3, >= 3.48.2)
32
+ aws-sdk-kms (~> 1)
33
+ aws-sigv4 (~> 1.0)
34
+ aws-sigv4 (1.1.0)
35
+ aws-eventstream (~> 1.0, >= 1.0.2)
36
+ cfndsl (0.16.13)
37
+ diff-lcs (1.3)
38
+ jmespath (1.4.0)
39
+ rake (10.5.0)
40
+ rspec (0.9.4)
41
+ rspec-core (3.8.0)
42
+ rspec-support (~> 3.8.0)
43
+ rspec-expectations (3.8.2)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.8.0)
46
+ rspec-mocks (3.8.0)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.8.0)
49
+ rspec-support (3.8.0)
50
+ thor (0.20.3)
51
+
52
+ PLATFORMS
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ bundler (~> 2)
57
+ cfn_monitor!
58
+ rake (~> 10.0)
59
+ rspec (~> 0.9)
60
+ rspec-core (~> 3.8)
61
+ rspec-expectations (~> 3.8)
62
+ rspec-mocks (~> 3.8)
63
+
64
+ BUNDLED WITH
65
+ 2.0.1
data/cfn_monitor.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency "aws-sdk-s3", "~> 1", "<2"
31
31
  spec.add_dependency "aws-sdk-elasticloadbalancingv2", "~> 1", "<2"
32
32
 
33
- spec.add_development_dependency "bundler", "~> 1.16"
33
+ spec.add_development_dependency "bundler", "~> 2"
34
34
  spec.add_development_dependency "rake", "~> 10.0"
35
35
  spec.add_development_dependency "rspec", "~> 0.9"
36
36
  spec.add_development_dependency "rspec-core", "~> 3.8"
@@ -1,3 +1,3 @@
1
1
  module CfnMonitor
2
- VERSION = "0.3.0".freeze
2
+ VERSION = "0.3.1".freeze
3
3
  end
@@ -11,4 +11,5 @@ resource_defaults:
11
11
  AWS::EC2::Instance: Ec2Instance
12
12
  AWS::Redshift::Cluster: RedshiftCluster
13
13
  AWS::DynamoDB::Table: DynamoDBTable
14
- AWS::ApiGateway::RestApi: ApiGateway
14
+ AWS::ApiGateway::RestApi: ApiGateway
15
+ AWS::AmazonMQ::Broker: AmazonMQBroker
@@ -484,6 +484,24 @@ templates:
484
484
  Statistic: Sum
485
485
  Threshold: 80
486
486
  EvaluationPeriods: 2
487
+ DynamoDBReadThrottleEvents:
488
+ AlarmActions: warn
489
+ Namespace: AWS/DynamoDB
490
+ MetricName: ReadThrottleEvents
491
+ ComparisonOperator: GreaterThanOrEqualToThreshold
492
+ DimensionsName: TableName
493
+ Statistic: Sum
494
+ Threshold: 1
495
+ EvaluationPeriods: 2
496
+ DynamoDBWriteThrottleEvents:
497
+ AlarmActions: warn
498
+ Namespace: AWS/DynamoDB
499
+ MetricName: WriteThrottleEvents
500
+ ComparisonOperator: GreaterThanOrEqualToThreshold
501
+ DimensionsName: TableName
502
+ Statistic: Sum
503
+ Threshold: 1
504
+ EvaluationPeriods: 2
487
505
  ElasticLoadBalancerSingleInstance: # AWS::ElasticLoadBalancing::LoadBalancer
488
506
  HealthyHosts:
489
507
  AlarmActions: crit
@@ -506,6 +524,7 @@ templates:
506
524
  Threshold: 0
507
525
  EvaluationPeriods: 10
508
526
  TreatMissingData: notBreaching
527
+
509
528
  # Custom metric checks. The dimensions are configured in the CloudWatch agent's config on the instance.
510
529
  DiskSpaceCheck:
511
530
  CritLowDiskSpaceRootPath:
@@ -519,7 +538,6 @@ templates:
519
538
  EvaluationPeriods: 1
520
539
  MetricName: DiskSpaceUsedPercent
521
540
  TreatMissingData: breaching
522
-
523
541
  WarnLowDiskSpaceRootPath:
524
542
  AlarmActions: warn
525
543
  Namespace: CWAgent
@@ -531,7 +549,6 @@ templates:
531
549
  EvaluationPeriods: 1
532
550
  MetricName: DiskSpaceUsedPercent
533
551
  TreatMissingData: breaching
534
-
535
552
  CritLowDiskSpaceDataPath:
536
553
  AlarmActions: crit
537
554
  Namespace: CWAgent
@@ -543,7 +560,6 @@ templates:
543
560
  EvaluationPeriods: 1
544
561
  MetricName: DiskSpaceUsedPercent
545
562
  TreatMissingData: breaching
546
-
547
563
  WarnLowDiskSpaceDataPath:
548
564
  AlarmActions: warn
549
565
  Namespace: CWAgent
@@ -555,7 +571,6 @@ templates:
555
571
  EvaluationPeriods: 1
556
572
  MetricName: DiskSpaceUsedPercent
557
573
  TreatMissingData: breaching
558
-
559
574
  CritLowDiskSpaceDockerPath:
560
575
  AlarmActions: crit
561
576
  Namespace: CWAgent
@@ -567,7 +582,6 @@ templates:
567
582
  EvaluationPeriods: 1
568
583
  MetricName: DiskSpaceUsedPercent
569
584
  TreatMissingData: breaching
570
-
571
585
  WarnLowDiskSpaceDockerPath:
572
586
  AlarmActions: warn
573
587
  Namespace: CWAgent
@@ -579,3 +593,47 @@ templates:
579
593
  EvaluationPeriods: 1
580
594
  MetricName: DiskSpaceUsedPercent
581
595
  TreatMissingData: breaching
596
+
597
+ AmazonMQBroker: # AWS::AmazonMQ::Broker
598
+ CpuCreditBalanceCrit:
599
+ AlarmActions: crit
600
+ Namespace: AWS/AmazonMQ
601
+ MetricName: CpuCreditBalance
602
+ ComparisonOperator: LessThanThreshold
603
+ Dimensions: [ { Name: 'Broker', Value: "${metric}" } ]
604
+ Statistic: Minimum
605
+ Threshold: 15
606
+ EvaluationPeriods: 1
607
+ TreatMissingData: notBreaching
608
+ CpuCreditBalanceWarn:
609
+ AlarmActions: warn
610
+ Namespace: AWS/AmazonMQ
611
+ MetricName: CpuCreditBalance
612
+ ComparisonOperator: LessThanThreshold
613
+ Dimensions: [ { Name: 'Broker', Value: "${metric}" } ]
614
+ Statistic: Minimum
615
+ Threshold: 30
616
+ EvaluationPeriods: 1
617
+ TreatMissingData: notBreaching
618
+ CpuUtilizationCrit:
619
+ AlarmActions: crit
620
+ Namespace: AWS/AmazonMQ
621
+ MetricName: CpuUtilization
622
+ ComparisonOperator: GreaterThanThreshold
623
+ Dimensions: [ { Name: 'Broker', Value: "${metric}" } ]
624
+ Statistic: Maximum
625
+ Threshold: 95
626
+ Period: 60
627
+ EvaluationPeriods: 3
628
+ TreatMissingData: notBreaching
629
+ CpuUtilizationWarn:
630
+ AlarmActions: warn
631
+ Namespace: AWS/AmazonMQ
632
+ MetricName: CpuUtilization
633
+ ComparisonOperator: GreaterThanThreshold
634
+ Dimensions: [ { Name: 'Broker', Value: "${metric}" } ]
635
+ Statistic: Maximum
636
+ Threshold: 80
637
+ Period: 60
638
+ EvaluationPeriods: 3
639
+ TreatMissingData: notBreaching
@@ -16,6 +16,9 @@ CloudFormation do
16
16
  Parameter("SnsTopicTask"){
17
17
  Type 'String'
18
18
  }
19
+ Parameter("SnsTopicInfo"){
20
+ Type 'String'
21
+ }
19
22
  Parameter("MonitoringDisabled"){
20
23
  Type 'String'
21
24
  }
@@ -30,11 +33,13 @@ CloudFormation do
30
33
  Condition('CritSNS', FnNot(FnEquals(Ref("SnsTopicCrit"),'')))
31
34
  Condition('WarnSNS', FnNot(FnEquals(Ref("SnsTopicWarn"),'')))
32
35
  Condition('TaskSNS', FnNot(FnEquals(Ref("SnsTopicTask"),'')))
36
+ Condition('InfoSNS', FnNot(FnEquals(Ref("SnsTopicInfo"),'')))
33
37
 
34
38
  actionsEnabledMap = {
35
39
  crit: FnIf('CritSNS',[ Ref('SnsTopicCrit') ], [ ]),
36
40
  warn: FnIf('WarnSNS',[ Ref('SnsTopicWarn') ], [ ]),
37
- task: FnIf('TaskSNS',[ Ref('SnsTopicTask') ], [ ])
41
+ task: FnIf('TaskSNS',[ Ref('SnsTopicTask') ], [ ]),
42
+ info: FnIf('InfoSNS',[ Ref('SnsTopicInfo') ], [ ]),
38
43
  }
39
44
 
40
45
  alarms.each do |alarm|
@@ -162,12 +167,13 @@ CloudFormation do
162
167
  Property('EvaluateLowSampleCountPercentile', params['EvaluateLowSampleCountPercentile']) unless params['EvaluateLowSampleCountPercentile'].nil?
163
168
  Property('EvaluationPeriods', FnFindInMap("#{alarmHash}",'EvaluationPeriods',Ref('EnvironmentType')))
164
169
  Property('ExtendedStatistic', params['ExtendedStatistic']) unless params['ExtendedStatistic'].nil?
170
+ Property('DatapointsToAlarm', params['DatapointsToAlarm']) unless params['DatapointsToAlarm'].nil?
165
171
  Property('InsufficientDataActions', insufficientDataActions)
166
172
  Property('MetricName', FnFindInMap("#{alarmHash}",'MetricName',Ref('EnvironmentType')))
167
173
  Property('Namespace', FnFindInMap("#{alarmHash}",'Namespace',Ref('EnvironmentType')))
168
174
  Property('OKActions', oKActions)
169
175
  Property('Period', FnFindInMap("#{alarmHash}",'Period',Ref('EnvironmentType')))
170
- Property('Statistic', FnFindInMap("#{alarmHash}",'Statistic',Ref('EnvironmentType')))
176
+ Property('Statistic', FnFindInMap("#{alarmHash}",'Statistic',Ref('EnvironmentType'))) unless !params['ExtendedStatistic'].nil?
171
177
  Property('Threshold', FnFindInMap("#{alarmHash}",'Threshold',Ref('EnvironmentType')))
172
178
  Property('TreatMissingData',FnFindInMap("#{alarmHash}",'TreatMissingData',Ref('EnvironmentType')))
173
179
  Property('Unit', params['Unit']) unless params['Unit'].nil?
@@ -19,6 +19,9 @@ CloudFormation do
19
19
  Parameter("SnsTopicTask"){
20
20
  Type 'String'
21
21
  }
22
+ Parameter("SnsTopicInfo"){
23
+ Type 'String'
24
+ }
22
25
  Parameter("MonitoringDisabled"){
23
26
  Type 'String'
24
27
  Default false
@@ -228,6 +231,7 @@ CloudFormation do
228
231
  SnsTopicCrit: Ref('SnsTopicCrit'),
229
232
  SnsTopicWarn: Ref('SnsTopicWarn'),
230
233
  SnsTopicTask: Ref('SnsTopicTask'),
234
+ SnsTopicInfo: Ref('SnsTopicInfo'),
231
235
  MonitoringDisabled: Ref('MonitoringDisabled'),
232
236
  EnvironmentType: Ref('EnvironmentType'),
233
237
  GetPhysicalIdFunctionArn: FnGetAtt('GetPhysicalIdFunction','Arn'),
@@ -15,6 +15,9 @@ CloudFormation do
15
15
  Parameter("SnsTopicTask"){
16
16
  Type 'String'
17
17
  }
18
+ Parameter("SnsTopicInfo"){
19
+ Type 'String'
20
+ }
18
21
  Parameter("MonitoringDisabled"){
19
22
  Type 'String'
20
23
  }
@@ -66,6 +69,7 @@ CloudFormation do
66
69
  SnsTopicCrit: Ref('SnsTopicCrit'),
67
70
  SnsTopicWarn: Ref('SnsTopicWarn'),
68
71
  SnsTopicTask: Ref('SnsTopicTask'),
72
+ SnsTopicInfo: Ref('SnsTopicInfo'),
69
73
  MonitoringDisabled: Ref('MonitoringDisabled'),
70
74
  EnvironmentType: Ref('EnvironmentType'),
71
75
  EnvironmentName: Ref('EnvironmentName')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Base2Services
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-02-10 00:00:00.000000000 Z
13
+ date: 2019-03-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '1.16'
109
+ version: '2'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '1.16'
116
+ version: '2'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rake
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -201,6 +201,7 @@ files:
201
201
  - ".travis.yml"
202
202
  - Dockerfile
203
203
  - Gemfile
204
+ - Gemfile.lock
204
205
  - LICENSE.txt
205
206
  - README.md
206
207
  - Rakefile
@@ -246,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
247
  - !ruby/object:Gem::Version
247
248
  version: '0'
248
249
  requirements: []
249
- rubygems_version: 3.0.2
250
+ rubygems_version: 3.0.3
250
251
  signing_key:
251
252
  specification_version: 4
252
253
  summary: Configure and generate a cloudwatch monitoring cloudformation stack