Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit d7e31210f30774cc0717a210aa639639ae72ed2c 1 parent 334ad75
Jason Draper authored
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
4 check_cpu.rb
@@ -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
3  check_disk.rb
@@ -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
1  check_memory.rb
@@ -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 "
Please sign in to comment.
Something went wrong with that request. Please try again.