Permalink
Browse files

updated the perf data symbls to not be a percent but a P

  • Loading branch information...
1 parent 334ad75 commit d7e31210f30774cc0717a210aa639639ae72ed2c Jason Draper committed Apr 26, 2010
Showing with 3 additions and 5 deletions.
  1. +2 −2 check_cpu.rb
  2. +1 −2 check_disk.rb
  3. +0 −1 check_memory.rb
View
@@ -17,7 +17,7 @@ def bytes_to_megabytes bytes
performance_data = ""
perf_label = "cpuload"
value = 0
-uom = ""
+uom = "p"
warning = ARGV[0]
critical = ARGV[1]
min = 0
@@ -47,7 +47,7 @@ def bytes_to_megabytes bytes
if using_performance_data
#setup the performance data
value = total_cpu.to_i
- uom="%"
+
performance_data= "#{perf_label}=#{value}#{uom};#{warning};#{critical};#{min};#{max}"
end
output_text = "#{status} CPU: #{total_cpu}% User:#{user_cpu}% Sytem: #{system_cpu}%"
View
@@ -13,7 +13,7 @@
performance_data = ""
perf_label = "diskspace"
value = 0
-uom = ""
+uom = "p"
warning = ARGV[0]
critical = ARGV[1]
disk = ARGV[2]
@@ -40,7 +40,6 @@
if using_performance_data
#setup the performance data
value = percent.to_i
- uom="%"
performance_data= "#{perf_label}=#{value}#{uom};#{warning};#{critical};"
end
free_gb = `df -hl | grep '#{disk}' | awk '{print $4}'`.chomp.chop.chop
View
@@ -54,7 +54,6 @@ def bytes_to_megabytes bytes
#setup the performance data
value = percent.to_i
- uom=""
performance_data= "#{perf_label}=#{value}#{uom};#{warning};#{critical};#{min};#{max}"
end
output_text = "#{status} #{percent.to_i}% free Installed Memory: #{total_memory }MB Free memory = #{total_free_memory}MB "

0 comments on commit d7e3121

Please sign in to comment.