bin/check-elb-latency.rb in sensu-plugins-aws-0.0.1.alpha.2 vs bin/check-elb-latency.rb in sensu-plugins-aws-0.0.1
- old
+ new
@@ -29,11 +29,10 @@
# Copyright 2014 github.com/y13i
# Released under the same terms as Sensu (the MIT license); see LICENSE
# for details.
#
-require 'rubygems' if RUBY_VERSION < '1.9.0'
require 'sensu-plugin/check/cli'
require 'aws-sdk'
class CheckELBLatency < Sensu::Plugin::Check::CLI
option :access_key_id,
@@ -140,10 +139,10 @@
@severities.keys.each do |severity|
threshold = config[:"#{severity}_over"]
next unless threshold
next if metric_value < threshold
flag_alert severity,
- "; #{elbs.size == 1 ? nil : "#{elb.inspect}'s"} Latency is #{sprintf '%.3f', metric_value} seconds. (expected lower than #{sprintf '%.3f', threshold})" # rubocop:disable LineLength
+ "; #{elbs.size == 1 ? nil : "#{elb.inspect}'s"} Latency is #{sprintf '%.3f', metric_value} seconds. (expected lower than #{sprintf '%.3f', threshold})" # rubocop:disable all
break
end
end
def run