Sha256: b437e80b3f2315cd3b3151c1eddf5cbf65dd82e9a27b621ebbb96f3411dc45b8

Contents?: true

Size: 1.38 KB

Versions: 13

Compression:

Stored size: 1.38 KB

Contents

module CfnGuardian::Resource
  class ECSCluster < Base
    
    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
    
    def default_events
      @events.push(CfnGuardian::Models::ContainerInstanceEvent.new(@resource))
    end
    
    def default_checks
      @checks.push(CfnGuardian::Models::ContainerInstanceCheck.new(@resource))
    end
    
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
cfn-guardian-0.11.11 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.10 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.9 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.8 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.7 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.6 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.5 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.4 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.3 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.2 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.1 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.11.0 lib/cfnguardian/resources/ecs_cluster.rb
cfn-guardian-0.10.4 lib/cfnguardian/resources/ecs_cluster.rb