From: Tom Hughes Date: Tue, 31 Mar 2015 18:48:17 +0000 (+0100) Subject: Fixup passenger munin plugins X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/0b310e3c9e2fa2f0fb717160677dfc90cbc04df4?ds=sidebyside Fixup passenger munin plugins --- diff --git a/cookbooks/munin/files/default/plugins/passenger_memory b/cookbooks/munin/files/default/plugins/passenger_memory index 7e6e36abc..1aa9a7764 100755 --- a/cookbooks/munin/files/default/plugins/passenger_memory +++ b/cookbooks/munin/files/default/plugins/passenger_memory @@ -3,6 +3,8 @@ # by Dan Manges, http://www.dcmanges.com/blog/rails-application-visualization-with-munin # NOTE: you might need to add munin to allow passwordless sudo for passenger-memory-stats +require "English" + def output_config puts <<-END graph_args --base 1024 -l 0 --vertical-label bytes --upper-limit 4056231936 diff --git a/cookbooks/munin/files/default/plugins/passenger_processes b/cookbooks/munin/files/default/plugins/passenger_processes index 59f9cdaa8..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 diff --git a/cookbooks/munin/files/default/plugins/passenger_queues b/cookbooks/munin/files/default/plugins/passenger_queues index a7060fd66..60be63389 100755 --- a/cookbooks/munin/files/default/plugins/passenger_queues +++ b/cookbooks/munin/files/default/plugins/passenger_queues @@ -1,5 +1,7 @@ #!/usr/bin/env ruby +require "English" + def output_config puts <<-END graph_category passenger @@ -17,7 +19,7 @@ def output_values $stderr.puts "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 diff --git a/cookbooks/munin/files/default/plugins/passenger_requests b/cookbooks/munin/files/default/plugins/passenger_requests index 39c87c821..1e34fc70f 100755 --- a/cookbooks/munin/files/default/plugins/passenger_requests +++ b/cookbooks/munin/files/default/plugins/passenger_requests @@ -1,5 +1,7 @@ #!/usr/bin/env ruby +require "English" + def output_config puts <<-END graph_args --base 1000