Module: Ruboty::SqsMonitor
- Defined in:
- lib/ruboty/sqs_monitor.rb,
lib/ruboty/sqs_monitor/aws/sqs.rb,
lib/ruboty/sqs_monitor/version.rb,
lib/ruboty/sqs_monitor/actions/add.rb,
lib/ruboty/sqs_monitor/actions/base.rb,
lib/ruboty/sqs_monitor/actions/list.rb,
lib/ruboty/sqs_monitor/actions/state.rb,
lib/ruboty/sqs_monitor/actions/delete.rb,
lib/ruboty/sqs_monitor/aws/cloudwatch.rb,
lib/ruboty/sqs_monitor/actions/state_trend.rb
Defined Under Namespace
Constant Summary collapse
- NAMESPACE =
"sqs_monitor"
- VERSION =
"0.1.0"
Class Method Summary collapse
- .cloudwatch(sqs_name, start_time = nil, end_time = nil) ⇒ Object
- .metrics ⇒ Object
- .sqs(name) ⇒ Object
- .trend_separator ⇒ Object
Class Method Details
.cloudwatch(sqs_name, start_time = nil, end_time = nil) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/ruboty/sqs_monitor.rb', line 14 def cloudwatch(sqs_name, start_time=nil, end_time=nil) = .merge( start_time: start_time, end_time: end_time, ) Aws::CloudWatch.new(sqs_name, ) end |
.metrics ⇒ Object
22 23 24 |
# File 'lib/ruboty/sqs_monitor.rb', line 22 def metrics (ENV["SQS_METRICS"] || DEFAULT_METRICS).split(/,/) end |
.sqs(name) ⇒ Object
10 11 12 |
# File 'lib/ruboty/sqs_monitor.rb', line 10 def sqs(name) Aws::Sqs.new(name, ) end |
.trend_separator ⇒ Object
26 27 28 |
# File 'lib/ruboty/sqs_monitor.rb', line 26 def trend_separator ENV["SQS_TREND_SEPARATOR"] || " " end |