1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Ruby plugins: apply code changes as suggested by "rubocop --auto-correct"

This commit is contained in:
Lars Kruse 2020-08-25 17:06:15 +02:00
parent b0b39b018e
commit 809639ab65
33 changed files with 904 additions and 910 deletions

View file

@ -8,13 +8,13 @@
process_stats_command = ENV['process_stats_command'] || '/opt/ruby-enterprise-1.8.6-20080810/bin/passenger-status'
if ARGV.length > 0 && ARGV[0] == 'config'
puts "graph_title Passenger Processes"
puts "graph_category webserver"
puts "graph_vlabel processes"
puts "max.label Max processes"
puts "count.label Total processes"
puts "active.label Active processes"
puts "queued.label Queued requests"
puts 'graph_title Passenger Processes'
puts 'graph_category webserver'
puts 'graph_vlabel processes'
puts 'max.label Max processes'
puts 'count.label Total processes'
puts 'active.label Active processes'
puts 'queued.label Queued requests'
exit(0)
end
@ -24,13 +24,14 @@ active = nil
queued = nil
`#{process_stats_command}`.each_line do |line|
if /max\s+=\s+(\d+)/.match(line)
case line
when /max\s+=\s+(\d+)/
max = $~[1]
elsif /count\s+=\s+(\d+)/.match(line)
when /count\s+=\s+(\d+)/
count = $~[1]
elsif /^active\s+=\s+(\d+)/.match(line)
when /^active\s+=\s+(\d+)/
active = $~[1]
elsif /Waiting on global queue\s+=\s+(\d+)/.match(line)
when /Waiting on global queue\s+=\s+(\d+)/
queued = $~[1]
end
end