]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/files/default/plugins/passenger_memory
Increase alert thresholds for minutely diffs
[chef.git] / cookbooks / munin / files / default / plugins / passenger_memory
index 2ce1a305f3a4efc33b88b27c1a9fc70e52d62e04..7e6e36abc8da3b392f357e5b789594afc803ef8d 100755 (executable)
@@ -16,12 +16,12 @@ end
 
 def output_values
   status = `/usr/sbin/passenger-memory-stats | tail -1`
-  unless $?.success?
+  unless $CHILD_STATUS.success?
     $stderr.puts "failed executing passenger-memory-stats"
     exit 1
   end
   status =~ /(\d+\.\d+)/
-  puts "memory.value #{($1.to_f * 1024 * 1024).round}"
+  puts "memory.value #{(Regexp.last_match[1].to_f * 1024 * 1024).round}"
 end
 
 if ARGV[0] == "config"