bin/check-sns-subscriptions.rb in sensu-plugins-aws-4.0.0 vs bin/check-sns-subscriptions.rb in sensu-plugins-aws-4.1.0
- old
+ new
@@ -42,11 +42,11 @@
def run
sns = Aws::SNS::Client.new
subscriptions = sns.list_subscriptions.subscriptions
- pending_confirmations = subscriptions.select { |subscription| subscription.subscription_arn == 'PendingConfirmation' }
+ pending_confirmations = subscriptions.select { |subscription| subscription.subscription_arn == 'PendingConfirmation' }.map(&:topic_arn)
- critical "#{pending_confirmations.size} pending confirmations" unless pending_confirmations.empty?
+ critical "#{pending_confirmations.size} pending confirmations (#{pending_confirmations})" unless pending_confirmations.empty?
ok
end
end