bin/check-elb-nodes.rb in sensu-plugins-aws-10.1.1 vs bin/check-elb-nodes.rb in sensu-plugins-aws-10.1.2
- old
+ new
@@ -114,10 +114,10 @@
if num_instances.zero?
critical 'ELB has no nodes'
elsif state['Unknown'].count == num_instances
unknown 'All nodes in unknown state'
- elsif state['InService'].count == 0
+ elsif state['InService'].count.zero?
critical message
elsif config[:crit_under] > 0 && config[:crit_under] >= state['InService'].count
critical message
elsif config[:crit_percent] > 0 && config[:crit_percent] >= (state['InService'].count / num_instances) * 100
critical message