bin/metrics-cpu.rb in sensu-plugins-cpu-checks-1.1.3 vs bin/metrics-cpu.rb in sensu-plugins-cpu-checks-2.0.0

- old
+ new

@@ -1,7 +1,6 @@ #! /usr/bin/env ruby -# encoding: UTF-8 # # cpu-metrics # # DESCRIPTION: # @@ -40,11 +39,11 @@ long: '--proc-path /proc', proc: proc(&:to_s), default: '/proc' def run - cpu_metrics = %w(user nice system idle iowait irq softirq steal guest guest_nice) - other_metrics = %w(ctxt processes procs_running procs_blocked btime intr) + cpu_metrics = %w[user nice system idle iowait irq softirq steal guest guest_nice] + other_metrics = %w[ctxt processes procs_running procs_blocked btime intr] cpu_count = 0 File.open("#{config[:proc_path]}/stat", 'r').each_line do |line| info = line.split(/\s+/) next if info.empty?