bin/check-ses-statistics.rb in sensu-plugins-aws-2.4.2 vs bin/check-ses-statistics.rb in sensu-plugins-aws-2.4.3
- old
+ new
@@ -116,10 +116,10 @@
response = ses.get_send_statistics
unknown 'Empty response from AWS SES API' if response.empty? # Can this happen?
unknown 'No data points from AWS SES API' if response.send_data_points.empty?
- response.send_data_points.sort_by(&:timestamp).last
+ data_point = response.send_data_points.sort_by(&:timestamp).last
bounces = data_point.bounces
rejects = data_point.rejects
complaints = data_point.complaints
delivery_attempts = data_point.delivery_attempts