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

- old
+ new

@@ -30,11 +30,11 @@ # # Check CPU # class CheckCPU < Sensu::Plugin::Check::CLI - CPU_METRICS = [:user, :nice, :system, :idle, :iowait, :irq, :softirq, :steal, :guest, :guest_nice].freeze + CPU_METRICS = %i[user nice system idle iowait irq softirq steal guest guest_nice].freeze option :less_than, description: 'Change whether value is less than check', short: '-l', long: '--less_than', @@ -67,10 +67,10 @@ option :idle_metrics, long: '--idle-metrics METRICS', description: 'Treat the specified metrics as idle. Defaults to idle,iowait,steal,guest,guest_nice', proc: proc { |x| x.split(/,/).map { |y| y.strip.to_sym } }, - default: [:idle, :iowait, :steal, :guest, :guest_nice] + default: %i[idle iowait steal guest guest_nice] CPU_METRICS.each do |metric| option metric, long: "--#{metric}", description: "Check cpu #{metric} instead of total cpu usage",