lib/cloudstack-nagios/commands/router.rb in cloudstack-nagios-0.12.2 vs lib/cloudstack-nagios/commands/router.rb in cloudstack-nagios-0.12.3

- old
+ new

@@ -13,10 +13,11 @@ values = free_output.scan(/\d+/) total = values[0].to_i free = values[2].to_i free_b = values[7].to_i data = check_data(total, total - free_b, options[:warning], options[:critical]) - puts "MEMORY #{RETURN_CODES[data[0]]} - usage = #{data[1]}% | usage=#{data[1]}% total=#{total}M free=#{free}M free_wo_buffers=#{free_b}M" + puts "MEMORY #{RETURN_CODES[data[0]]} - usage = #{data[1]}% (#{((total - free_b)/1024.0).round(0)}/#{(total/1024.0).round(0)}MB) | \ + usage=#{data[1]}% total=#{total}M free=#{free}M free_wo_buffers=#{free_b}M".gsub(/\s+/, " ") exit data[0] rescue => e exit_with_failure(e) end end