Sha256: a27ed8518b0eaf33aca1c5f8624e936267a38e03e89fe795441e7896275621c9

Contents?: true

Size: 1.73 KB

Versions: 10

Compression:

Stored size: 1.73 KB

Contents

module CfnGuardian::Resource
  class RDSClusterInstance < Base
    
    def default_alarms    
      alarm = CfnGuardian::Models::RDSClusterInstanceAlarm.new(@resource)
      alarm.name = 'CPUUtilizationHighSpike'
      alarm.metric_name = 'CPUUtilization'
      alarm.threshold = 95
      alarm.evaluation_periods = 10
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::RDSClusterInstanceAlarm.new(@resource)
      alarm.name = 'CPUUtilizationHighBase'
      alarm.metric_name = 'CPUUtilization'
      alarm.threshold = 75
      alarm.evaluation_periods = 60
      alarm.alarm_action = 'Warning'
      @alarms.push(alarm)
      
      alarm = CfnGuardian::Models::RDSClusterInstanceAlarm.new(@resource)
      alarm.name = 'DatabaseConnections'
      alarm.metric_name = 'DatabaseConnections'
      alarm.statistic = 'Minimum'
      alarm.threshold = 45
      alarm.evaluation_periods = 10
      @alarms.push(alarm)
    end

    def default_event_subscriptions()
      event_subscription = CfnGuardian::Models::RDSInstanceEventSubscription.new(@resource)
      event_subscription.name = 'MasterPasswordReset'
      event_subscription.event_id = 'RDS-EVENT-0016'
      @event_subscriptions.push(event_subscription)

      event_subscription = CfnGuardian::Models::RDSInstanceEventSubscription.new(@resource)
      event_subscription.name = 'MasterPasswordResetFailure'
      event_subscription.event_id = 'RDS-EVENT-0067'
      @event_subscriptions.push(event_subscription)
      
      event_subscription = CfnGuardian::Models::RDSClusterInstanceEventSubscription.new(@resource)
      event_subscription.name = 'AuroraStorageLow'
      event_subscription.event_id = 'RDS-EVENT-0227'
      @event_subscriptions.push(event_subscription)
    end
    
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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