]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/files/default/plugins/passenger_queues
Add munin plugin to monitor rrdcached
[chef.git] / cookbooks / munin / files / default / plugins / passenger_queues
index 9a67fafc7a528076c48ef9bdbc0a3f85efded50b..a7060fd665c9c5ed9159e2ddcd8bdd57dbddb2a2 100755 (executable)
@@ -13,12 +13,12 @@ end
 
 def output_values
   status = `/usr/sbin/passenger-status`
-  unless $?.success?
+  unless $CHILD_STATUS.success?
     $stderr.puts "failed executing passenger-status"
     exit 1
   end
   status =~ /Waiting on global queue:\s+(\d+)/
-  puts "global.value #{$1}"
+  puts "global.value #{Regexp.last_match[1]}"
 end
 
 if ARGV[0] == "config"