cfn_monitor 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cfn_monitor/generate.rb +15 -6
- data/lib/cfn_monitor/version.rb +1 -1
- data/lib/config/templates.yml +95 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f82fba1b0a02e6030b91b9edda8a57a64521771cec555774f454d5f744e7b90a
|
4
|
+
data.tar.gz: e5418101905069220eee2c3f2125be30a6082544bec2767297ef4e42b457a287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0186c8bc6f63540f48798cc32a1947bf36279226600ba758834155ba3a9e5ad574f4877972681d781969f10dab08aabb0dba2388d712d64ef7cabf79d6212ee7'
|
7
|
+
data.tar.gz: 00ac7ac7ceae22e0828ef760805799079a362f076e7f694ce097306a26e07f3b8a2c5f446e52b2bbebe7315b482e653abb9d666218f10e028cfc91d2429a0c8c
|
data/lib/cfn_monitor/generate.rb
CHANGED
@@ -16,7 +16,21 @@ module CfnMonitor
|
|
16
16
|
verbose_cfndsl = STDOUT
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
if options['application']
|
20
|
+
application = options['application']
|
21
|
+
custom_alarms_config_file = "#{application}/alarms.yml"
|
22
|
+
custom_templates_config_file = "#{application}/templates.yml"
|
23
|
+
output_path = "output/#{application}"
|
24
|
+
else
|
25
|
+
application = File.basename(Dir.getwd)
|
26
|
+
custom_alarms_config_file = "alarms.yml"
|
27
|
+
custom_templates_config_file = "templates.yml"
|
28
|
+
output_path = "output"
|
29
|
+
end
|
30
|
+
|
31
|
+
upload_path = "cloudformation/monitoring/#{application}"
|
32
|
+
|
33
|
+
application = File.basename(Dir.getwd)
|
20
34
|
|
21
35
|
template_path = File.join(File.dirname(__FILE__),'../config/templates.yml')
|
22
36
|
config_path = File.join(File.dirname(__FILE__),'../config/config.yml')
|
@@ -24,11 +38,6 @@ module CfnMonitor
|
|
24
38
|
global_templates_config = YAML.load(File.read(template_path))
|
25
39
|
config = YAML.load(File.read(config_path))
|
26
40
|
|
27
|
-
custom_alarms_config_file = "#{application}/alarms.yml"
|
28
|
-
custom_templates_config_file = "#{application}/templates.yml"
|
29
|
-
output_path = "output/#{application}"
|
30
|
-
upload_path = "cloudformation/monitoring/#{application}"
|
31
|
-
|
32
41
|
# Load custom config files
|
33
42
|
if File.file?(custom_alarms_config_file)
|
34
43
|
custom_alarms_config = YAML.load(File.read(custom_alarms_config_file))
|
data/lib/cfn_monitor/version.rb
CHANGED
data/lib/config/templates.yml
CHANGED
@@ -484,3 +484,98 @@ templates:
|
|
484
484
|
Statistic: Sum
|
485
485
|
Threshold: 80
|
486
486
|
EvaluationPeriods: 2
|
487
|
+
ElasticLoadBalancerSingleInstance: # AWS::ElasticLoadBalancing::LoadBalancer
|
488
|
+
HealthyHosts:
|
489
|
+
AlarmActions: crit
|
490
|
+
Namespace: AWS/ELB
|
491
|
+
MetricName: HealthyHostCount
|
492
|
+
ComparisonOperator: LessThanThreshold
|
493
|
+
DimensionsName: LoadBalancerName
|
494
|
+
Statistic: Minimum
|
495
|
+
Threshold: 1
|
496
|
+
Threshold.development: 1
|
497
|
+
EvaluationPeriods: 1
|
498
|
+
TreatMissingData: notBreaching
|
499
|
+
UnHealthyHosts:
|
500
|
+
AlarmActions: warn
|
501
|
+
Namespace: AWS/ELB
|
502
|
+
MetricName: UnHealthyHostCount
|
503
|
+
ComparisonOperator: GreaterThanThreshold
|
504
|
+
DimensionsName: LoadBalancerName
|
505
|
+
Statistic: Maximum
|
506
|
+
Threshold: 0
|
507
|
+
EvaluationPeriods: 10
|
508
|
+
TreatMissingData: notBreaching
|
509
|
+
# Custom metric checks. The dimensions are configured in the CloudWatch agent's config on the instance.
|
510
|
+
DiskSpaceCheck:
|
511
|
+
CritLowDiskSpaceRootPath:
|
512
|
+
AlarmActions: crit
|
513
|
+
Namespace: CWAgent
|
514
|
+
ComparisonOperator: GreaterThanThreshold
|
515
|
+
Dimensions: [ { Name: 'path', Value: '/' }, { Name: 'host', Value: "${metric}" }, { Name: 'device', Value: 'xvda1' }, { Name: 'fstype', Value: 'ext4' } ]
|
516
|
+
Statistic: Maximum
|
517
|
+
Threshold: 85 # Percentage used
|
518
|
+
Period: 60
|
519
|
+
EvaluationPeriods: 1
|
520
|
+
MetricName: DiskSpaceUsedPercent
|
521
|
+
TreatMissingData: breaching
|
522
|
+
|
523
|
+
WarnLowDiskSpaceRootPath:
|
524
|
+
AlarmActions: warn
|
525
|
+
Namespace: CWAgent
|
526
|
+
ComparisonOperator: GreaterThanThreshold
|
527
|
+
Dimensions: [ { Name: 'path', Value: '/' }, { Name: 'host', Value: "${metric}" }, { Name: 'device', Value: 'xvda1' }, { Name: 'fstype', Value: 'ext4' } ]
|
528
|
+
Statistic: Maximum
|
529
|
+
Threshold: 75 # Percentage used
|
530
|
+
Period: 60
|
531
|
+
EvaluationPeriods: 1
|
532
|
+
MetricName: DiskSpaceUsedPercent
|
533
|
+
TreatMissingData: breaching
|
534
|
+
|
535
|
+
CritLowDiskSpaceDataPath:
|
536
|
+
AlarmActions: crit
|
537
|
+
Namespace: CWAgent
|
538
|
+
ComparisonOperator: GreaterThanThreshold
|
539
|
+
Dimensions: [ { Name: 'path', Value: '/data' }, { Name: 'host', Value: "${metric}" }, { Name: 'device', Value: 'xvdf' }, { Name: 'fstype', Value: 'ext4' } ]
|
540
|
+
Statistic: Maximum
|
541
|
+
Threshold: 85 # Percentage used
|
542
|
+
Period: 60
|
543
|
+
EvaluationPeriods: 1
|
544
|
+
MetricName: DiskSpaceUsedPercent
|
545
|
+
TreatMissingData: breaching
|
546
|
+
|
547
|
+
WarnLowDiskSpaceDataPath:
|
548
|
+
AlarmActions: warn
|
549
|
+
Namespace: CWAgent
|
550
|
+
ComparisonOperator: GreaterThanThreshold
|
551
|
+
Dimensions: [ { Name: 'path', Value: '/data' }, { Name: 'host', Value: "${metric}" }, { Name: 'device', Value: 'xvdf' }, { Name: 'fstype', Value: 'ext4' } ]
|
552
|
+
Statistic: Maximum
|
553
|
+
Threshold: 75 # Percentage used
|
554
|
+
Period: 60
|
555
|
+
EvaluationPeriods: 1
|
556
|
+
MetricName: DiskSpaceUsedPercent
|
557
|
+
TreatMissingData: breaching
|
558
|
+
|
559
|
+
CritLowDiskSpaceDockerPath:
|
560
|
+
AlarmActions: crit
|
561
|
+
Namespace: CWAgent
|
562
|
+
ComparisonOperator: GreaterThanThreshold
|
563
|
+
Dimensions: [ { Name: 'path', Value: '/var/lib/docker' }, { Name: 'host', Value: "${metric}" }, { Name: 'device', Value: 'xvdcz' }, { Name: 'fstype', Value: 'ext4' } ]
|
564
|
+
Statistic: Maximum
|
565
|
+
Threshold: 85 # Percentage used
|
566
|
+
Period: 60
|
567
|
+
EvaluationPeriods: 1
|
568
|
+
MetricName: DiskSpaceUsedPercent
|
569
|
+
TreatMissingData: breaching
|
570
|
+
|
571
|
+
WarnLowDiskSpaceDockerPath:
|
572
|
+
AlarmActions: warn
|
573
|
+
Namespace: CWAgent
|
574
|
+
ComparisonOperator: GreaterThanThreshold
|
575
|
+
Dimensions: [ { Name: 'path', Value: '/var/lib/docker' }, { Name: 'host', Value: "${metric}" }, { Name: 'device', Value: 'xvdcz' }, { Name: 'fstype', Value: 'ext4' } ]
|
576
|
+
Statistic: Maximum
|
577
|
+
Threshold: 75 # Percentage used
|
578
|
+
Period: 60
|
579
|
+
EvaluationPeriods: 1
|
580
|
+
MetricName: DiskSpaceUsedPercent
|
581
|
+
TreatMissingData: breaching
|
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.
|
4
|
+
version: 0.3.0
|
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-
|
13
|
+
date: 2019-02-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|