X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..57ee30ffe5e6106f3cbd9a91c1599eb5b51e8c36:/cookbooks/munin/files/default/plugins/passenger_requests diff --git a/cookbooks/munin/files/default/plugins/passenger_requests b/cookbooks/munin/files/default/plugins/passenger_requests index f783be974..dac457e33 100755 --- a/cookbooks/munin/files/default/plugins/passenger_requests +++ b/cookbooks/munin/files/default/plugins/passenger_requests @@ -1,24 +1,26 @@ #!/usr/bin/env ruby +require "English" + def output_config - puts <<-END -graph_args --base 1000 -graph_category passenger -graph_title Passenger requests -graph_vlabel requests / ${graph_period} + puts <<~CONFIG + graph_args --base 1000 + graph_category passenger + graph_title Passenger requests + graph_vlabel requests / ${graph_period} -requests.label requests -requests.type DERIVE -requests.max 1000000 -requests.min 0 -END + requests.label requests + requests.type DERIVE + requests.max 1000000 + requests.min 0 + 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 total_requests = 0