Class: CfnGuardian::Resource::ECSCluster
- Defined in:
- lib/cfnguardian/resources/ecs_cluster.rb
Instance Method Summary collapse
Methods inherited from Base
#default_event_subscriptions, #default_metric_filters, #get_alarms, #get_checks, #get_cost, #get_event_subscriptions, #get_events, #get_metric_filters, #initialize, #resource_exists?
Methods included from Logging
colors, included, logger, #logger, logger=
Constructor Details
This class inherits a constructor from CfnGuardian::Resource::Base
Instance Method Details
#default_alarms ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cfnguardian/resources/ecs_cluster.rb', line 4 def default_alarms alarm = CfnGuardian::Models::ECSClusterAlarm.new(@resource) alarm.name = 'CPUUtilizationWarning' alarm.metric_name = 'CPUUtilization' alarm.alarm_action = 'Warning' alarm.statistic = 'Minimum' @alarms.push(alarm) alarm = CfnGuardian::Models::ECSClusterAlarm.new(@resource) alarm.name = 'MemoryUtilizationWarning' alarm.metric_name = 'MemoryUtilization' alarm.alarm_action = 'Warning' @alarms.push(alarm) alarm = CfnGuardian::Models::ECSClusterAlarm.new(@resource) alarm.name = 'MemoryUtilizationCritical' alarm.metric_name = 'MemoryUtilization' alarm.threshold = 90 @alarms.push(alarm) alarm = CfnGuardian::Models::ECSClusterAlarm.new(@resource) alarm.namespace = 'EcsCICheck' alarm.name = 'ECSContainerInstancesDisconnected' alarm.metric_name = 'ECSContainerInstancesDisconnected' alarm.alarm_action = 'Critical' alarm.threshold = 0 alarm.period = 300 alarm.evaluation_periods = 2 @alarms.push(alarm) end |
#default_checks ⇒ Object
39 40 41 |
# File 'lib/cfnguardian/resources/ecs_cluster.rb', line 39 def default_checks @checks.push(CfnGuardian::Models::ContainerInstanceCheck.new(@resource)) end |
#default_events ⇒ Object
35 36 37 |
# File 'lib/cfnguardian/resources/ecs_cluster.rb', line 35 def default_events @events.push(CfnGuardian::Models::ContainerInstanceEvent.new(@resource)) end |