bin/check-rds-events.rb in sensu-plugins-aws-10.1.1 vs bin/check-rds-events.rb in sensu-plugins-aws-10.1.2

- old
+ new

@@ -88,11 +88,11 @@ def maint_clusters maint_clusters = [] aws_regions = rds_regions - unless config[:aws_region].casecmp('all') == 0 + unless config[:aws_region].casecmp('all').zero? if aws_regions.include? config[:aws_region] aws_regions.clear.push(config[:aws_region]) else critical 'Invalid region specified!' end @@ -129,11 +129,10 @@ # draft the messages cluster_name_long = "#{cluster_name} (#{r}) #{events_record[:events][-1][:message]}" maint_clusters.push(cluster_name_long) end - - rescue => e + rescue StandardError => e unknown "An error occurred processing AWS RDS API (#{r}): #{e.message}" end end maint_clusters