bin/check-elb-certs.rb in sensu-plugins-aws-10.1.1 vs bin/check-elb-certs.rb in sensu-plugins-aws-10.1.2
- old
+ new
@@ -92,11 +92,11 @@
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
cert = ''
begin
http.start { cert = http.peer_cert }
- rescue => e
+ rescue StandardError => e
critical "An issue occurred attempting to get cert: #{e.message}"
end
cert_days_remaining = ((cert.not_after - Time.now) / 86_400).to_i
message = sprintf '%s(%d)', lb.load_balancer_name, cert_days_remaining
@@ -109,10 +109,10 @@
ok_message << message
end
end
end
end
- rescue => e
+ rescue StandardError => e
unknown "An error occurred processing AWS ELB API: #{e.message}"
end
if !critical_message.empty?
message = cert_message(critical_message.length, 'expiring within', config[:crit_under])