X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..85451f2406230f9a84becb03f825168ff1ea19c1:/cookbooks/munin/files/default/plugins/passenger_processes?ds=sidebyside diff --git a/cookbooks/munin/files/default/plugins/passenger_processes b/cookbooks/munin/files/default/plugins/passenger_processes index d89d0412e..39842a04f 100755 --- a/cookbooks/munin/files/default/plugins/passenger_processes +++ b/cookbooks/munin/files/default/plugins/passenger_processes @@ -1,5 +1,7 @@ #!/usr/bin/env ruby +require "English" + def output_config puts <<-END graph_category passenger @@ -18,15 +20,15 @@ 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 =~ /active\s+=\s+(\d+)/ - puts "active.value #{$1}" + puts "active.value #{Regexp.last_match[1]}" status =~ /inactive\s+=\s+(\d+)/ - puts "inactive.value #{$1}" + puts "inactive.value #{Regexp.last_match[1]}" end if ARGV[0] == "config"