bin/check-emr-steps.rb in sensu-plugins-aws-3.2.0 vs bin/check-emr-steps.rb in sensu-plugins-aws-3.2.1

- old
+ new

@@ -57,10 +57,11 @@ option :count, short: '-c COUNT', long: '--count', description: 'Max number of steps with this status.', + proc: proc(&:to_i), default: 0 def run emr = Aws::EMR::Client.new(aws_config) begin @@ -69,10 +70,10 @@ critical "EMR cluster #{config[:cluster_name]} not found" if clusters.empty? cluster = clusters.sort_by { |c| c.status.timeline.creation_date_time }.reverse.first steps = emr.list_steps( cluster_id: cluster.id, - step_states: config[:status] + step_states: [config[:status]] ).steps messages = [] now = Time.new failed = steps.select { |step| now - step.status.timeline.end_date_time < 10 * 60 }