X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/3a4d52bd4c0f8e6ae7679145846b7bc7845d8ace..57ee30ffe5e6106f3cbd9a91c1599eb5b51e8c36:/cookbooks/munin/files/default/plugins/passenger_queues diff --git a/cookbooks/munin/files/default/plugins/passenger_queues b/cookbooks/munin/files/default/plugins/passenger_queues index 506afb851..0850ed273 100755 --- a/cookbooks/munin/files/default/plugins/passenger_queues +++ b/cookbooks/munin/files/default/plugins/passenger_queues @@ -1,23 +1,25 @@ #!/usr/bin/env ruby +require "English" + def output_config - puts <<-END -graph_category passenger -graph_title Passenger queues -graph_vlabel count + puts <<~CONFIG + graph_category passenger + graph_title Passenger queues + graph_vlabel count -global.label global -END + global.label global + CONFIG exit 0 end def output_values status = `/usr/sbin/passenger-status` - unless $?.success? - $stderr.puts "failed executing passenger-status" + unless $CHILD_STATUS.success? + warn "failed executing passenger-status" exit 1 end - status =~ /Waiting on global queue:\s+(\d+)/ + status =~ /Requests in top-level queue :\s+(\d+)/ puts "global.value #{Regexp.last_match[1]}" end