bin/check-bluepill-procs.rb in sensu-plugins-bluepill-1.0.0 vs bin/check-bluepill-procs.rb in sensu-plugins-bluepill-2.0.0
- old
+ new
@@ -57,11 +57,11 @@
short: '-s',
long: '--sudo',
description: 'exec bluepill with sudo (needs passwordless)'
def merge_output(orig, add)
- orig.keys.each { |k| orig[k].push(*add[k]) }
+ orig.each_key { |k| orig[k].push(*add[k]) }
orig
end
def bluepill_application_status(name)
out = { name: [], ok: [], warn: [], crit: [], err: [] }
@@ -88,10 +88,10 @@
out[:ok] << "#{name}::#{line}".strip
next
end
end
end
- out[:err] << name if processes_found == 0
+ out[:err] << name if processes_found.zero?
puts "***** DEBUG: bluepill #{name} status parsed ******\n#{out.inspect}" if config[:debug]
out
end
def parse_output(out)