bin/check-ses-limit.rb in sensu-plugins-aws-3.2.1 vs bin/check-ses-limit.rb in sensu-plugins-aws-4.0.0

- old
+ new

@@ -73,10 +73,10 @@ unknown "An issue occured while communicating with the AWS SES API: #{e.message}" end unknown 'Empty response from AWS SES API' if response.empty? # Can this happen? - percent = (response.sent_last_24_hours.to_i / response.max_24_hour_send.to_i) * 100 + percent = ((response.sent_last_24_hours.to_f / response.max_24_hour_send.to_f) * 100).to_i message = "SES sending limit is at #{percent}%" if config[:crit_percent] > 0 && config[:crit_percent] <= percent critical message elsif config[:warn_percent] > 0 && config[:warn_percent] <= percent