Browse files

minor fixes to perfdata output

  • Loading branch information...
1 parent 658d9f2 commit 78e76e06dcd0bb926f6ac593dd8e7b8d8e12751f @jhstatewide committed Jun 29, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/nagios-plugin.rb
View
4 lib/nagios-plugin.rb
@@ -107,9 +107,11 @@ def do_exit(status, message)
# see if we have keys...
if @perfdata.keys.length > 0
@output += " | "
+ outputs = []
@perfdata.each_pair do |key, value|
- @output += "#{key}=#{value[:data]}#{value[:uom]};#{value[:warning]};#{value[:critical]}"
+ outputs << "#{key}=#{value[:data]}#{value[:uom]};#{value[:warning]};#{value[:critical]}"
end
+ @output += outputs.join(", ")
end
@output.strip!
puts @output if @print

0 comments on commit 78e76e0

Please sign in to comment.