mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 10:28:36 +00:00
Ruby plugins: apply code changes as suggested by "rubocop --auto-correct"
This commit is contained in:
parent
b0b39b018e
commit
809639ab65
33 changed files with 904 additions and 910 deletions
|
@ -28,27 +28,27 @@ end
|
|||
def output_values
|
||||
status = `sudo passenger-status`
|
||||
unless $?.success?
|
||||
$stderr.puts "failed executing passenger-status"
|
||||
warn 'failed executing passenger-status'
|
||||
exit 1
|
||||
end
|
||||
status =~ /max\s+=\s+(\d+)/
|
||||
puts "max.value #{$1}"
|
||||
puts "max.value #{Regexp.last_match(1)}"
|
||||
|
||||
status =~ /count\s+=\s+(\d+)/
|
||||
puts "running.value #{$1}"
|
||||
puts "running.value #{Regexp.last_match(1)}"
|
||||
|
||||
status =~ /active\s+=\s+(\d+)/
|
||||
puts "active.value #{$1}"
|
||||
puts "active.value #{Regexp.last_match(1)}"
|
||||
|
||||
status =~ /Waiting on global queue:\s+(\d+)/
|
||||
puts "waiting.value #{$1}"
|
||||
puts "waiting.value #{Regexp.last_match(1)}"
|
||||
|
||||
total_sessions = 0
|
||||
status.scan(/Sessions: (\d+)/).flatten.each { |count| total_sessions += count.to_i }
|
||||
puts "sessions.value #{total_sessions}"
|
||||
end
|
||||
|
||||
if ARGV[0] == "config"
|
||||
if ARGV[0] == 'config'
|
||||
output_config
|
||||
else
|
||||
output_values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue