bin/check-instance-health.rb in sensu-plugins-aws-10.1.0 vs bin/check-instance-health.rb in sensu-plugins-aws-10.1.1
- old
+ new
@@ -44,10 +44,10 @@
long: '--filter FILTER',
description: 'String representation of the filter to apply',
default: '{}'
def gather_events(events)
- useful_events = events.reject { |x| (x[:code] =~ /system-reboot|instance-stop|system-maintenance/) && (x[:description] =~ /\[Completed\]|\[Canceled\]/) }
+ useful_events = events.reject { |x| (x[:code] =~ /system-reboot|instance-stop|system-maintenance/) || (x[:description] =~ /\[Completed\]|\[Canceled\]/) }
!useful_events.empty?
end
def gather_status(status_checks)
['impaired', 'insufficient-data'].include? status_checks.status