Class: CfnGuardian::Resource::AmazonMQRabbitMQBroker

Inherits:
Base
  • Object
show all
Defined in:
lib/cfnguardian/resources/amazonmq_rabbitmq.rb

Instance Method Summary collapse

Methods inherited from Base

#default_checks, #default_event_subscriptions, #default_events, #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_alarmsObject



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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/cfnguardian/resources/amazonmq_rabbitmq.rb', line 4

def default_alarms
  alarm = CfnGuardian::Models::AmazonMQRabbitMQBrokerAlarm.new(@resource)
  alarm.name = 'ConnectionCountCritical'
  alarm.metric_name = 'ConnectionCount'
  alarm.comparison_operator = 'GreaterThanThreshold'
  alarm.statistic = 'Maximum'
  alarm.threshold = 50
  alarm.evaluation_periods = 5
  alarm.treat_missing_data = 'notBreaching'
  @alarms.push(alarm)

  alarm = CfnGuardian::Models::AmazonMQRabbitMQBrokerAlarm.new(@resource)
  alarm.name = 'ConnectionCountWarn'
  alarm.metric_name = 'ConnectionCount'
  alarm.comparison_operator = 'GreaterThanThreshold'
  alarm.statistic = 'Maximum'
  alarm.threshold = 25
  alarm.evaluation_periods = 5
  alarm.treat_missing_data = 'notBreaching'
  alarm.alarm_action = 'Warning'
  @alarms.push(alarm)

  alarm = CfnGuardian::Models::AmazonMQRabbitMQBrokerAlarm.new(@resource)
  alarm.name = 'MessageCountCritical'
  alarm.metric_name = 'MessageCount'
  alarm.comparison_operator = 'GreaterThanThreshold'
  alarm.statistic = 'Maximum'
  alarm.threshold = 500
  alarm.evaluation_periods = 5
  alarm.treat_missing_data = 'notBreaching'
  @alarms.push(alarm)

  alarm = CfnGuardian::Models::AmazonMQRabbitMQBrokerAlarm.new(@resource)
  alarm.name = 'MessageCountWarn'
  alarm.metric_name = 'MessageCount'
  alarm.comparison_operator = 'GreaterThanThreshold'
  alarm.statistic = 'Maximum'
  alarm.threshold = 250
  alarm.evaluation_periods = 5
  alarm.treat_missing_data = 'notBreaching'
  alarm.alarm_action = 'Warning'
  @alarms.push(alarm)

end