Skip to content

Commit

Permalink
minor fixes to perfdata output
Browse files Browse the repository at this point in the history
  • Loading branch information
jhstatewide committed Jun 29, 2011
1 parent 658d9f2 commit 78e76e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/nagios-plugin.rb
Expand Up @@ -107,9 +107,11 @@ def do_exit(status, message)
# see if we have keys... # see if we have keys...
if @perfdata.keys.length > 0 if @perfdata.keys.length > 0
@output += " | " @output += " | "
outputs = []
@perfdata.each_pair do |key, value| @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 end
@output += outputs.join(", ")
end end
@output.strip! @output.strip!
puts @output if @print puts @output if @print
Expand Down

0 comments on commit 78e76e0

Please sign in to comment.