Sha256: 69690f177ad1d2bc1694042f98c0e66dc5f8a5954726caa802e96f885d07af3c

Contents?: true

Size: 686 Bytes

Versions: 4

Compression:

Stored size: 686 Bytes

Contents

module CfnGuardian
  module Resource
    class Ec2Instance < Base
      
      def default_alarms    
        alarm = CfnGuardian::Models::Ec2InstanceAlarm.new(@resource)
        alarm.name = 'CPUUtilizationHigh'
        alarm.metric_name = 'CPUUtilization'
        alarm.statistic = 'Minimum'
        alarm.threshold = 90
        alarm.evaluation_periods = 10
        @alarms.push(alarm)
        
        alarm = CfnGuardian::Models::Ec2InstanceAlarm.new(@resource)
        alarm.name = 'StatusCheckFailed'
        alarm.metric_name = 'StatusCheckFailed'
        alarm.threshold = 90
        alarm.evaluation_periods = 10
        @alarms.push(alarm)
      end
      
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cfn-guardian-0.4.0 lib/cfnguardian/resources/ec2_instance.rb
cfn-guardian-0.3.4 lib/cfnguardian/resources/ec2_instance.rb
cfn-guardian-0.3.3 lib/cfnguardian/resources/ec2_instance.rb
cfn-guardian-0.1.0 lib/cfnguardian/resources/ec2_instance.rb