X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/21958591555b0b80370e944e3128ac5d533c281d..57ee30ffe5e6106f3cbd9a91c1599eb5b51e8c36:/cookbooks/munin/files/default/plugins/passenger_processes diff --git a/cookbooks/munin/files/default/plugins/passenger_processes b/cookbooks/munin/files/default/plugins/passenger_processes index 59f9cdaa8..0611ccc0e 100755 --- a/cookbooks/munin/files/default/plugins/passenger_processes +++ b/cookbooks/munin/files/default/plugins/passenger_processes @@ -1,25 +1,27 @@ #!/usr/bin/env ruby +require "English" + def output_config - puts <<-END -graph_category passenger -graph_title Passenger processes -graph_order active inactive -graph_vlabel processes -graph_total total + puts <<~CONFIG + graph_category passenger + graph_title Passenger processes + graph_order active inactive + graph_vlabel processes + graph_total total -active.label busy servers -active.draw AREA -inactive.label idle servers -inactive.draw STACK -END + active.label busy servers + active.draw AREA + inactive.label idle servers + inactive.draw STACK + CONFIG exit 0 end def output_values status = `/usr/sbin/passenger-status` unless $CHILD_STATUS.success? - $stderr.puts "failed executing passenger-status" + warn "failed executing passenger-status" exit 1 end status =~ /active\s+=\s+(\d+)/