Sha256: 5ec088997ac7b59f170a8c40393fb49622adc63079fe3b4fdbcf33d8a57fd713

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

module CfnGuardian::Resource
  class ApplicationTargetGroup < Base
        
    def default_alarms    
      alarm = CfnGuardian::Models::ApplicationTargetGroupAlarm.new(@resource)
      alarm.name = 'HealthyHosts'
      alarm.metric_name = 'HealthyHostCount'
      alarm.comparison_operator = 'LessThanThreshold'
      alarm.statistic = 'Minimum'
      alarm.threshold = 2
      alarm.evaluation_periods = 1
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::ApplicationTargetGroupAlarm.new(@resource)
      alarm.name = 'UnHealthyHosts'
      alarm.metric_name = 'UnHealthyHostCount'
      alarm.threshold = 0
      alarm.evaluation_periods = 10
      alarm.treat_missing_data = 'notBreaching'
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::ApplicationTargetGroupAlarm.new(@resource)
      alarm.enabled = false
      alarm.name = 'TargetResponseTime'
      alarm.metric_name = 'TargetResponseTime'
      alarm.extended_statistic = 'p95'
      alarm.threshold = 5
      alarm.evaluation_periods = 5
      @alarms.push(alarm)
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cfn-guardian-0.11.11 lib/cfnguardian/resources/application_targetgroup.rb