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

- old
+ new

@@ -56,10 +56,10 @@ cpu_count = cpu_count + 1 # rubocop:disable Style/SelfAssignment name = 'total' if name == 'cpu' info.size.times { |i| output "#{config[:scheme]}.#{name}.#{cpu_metrics[i]}", info[i] } end - output "#{config[:scheme]}.#{name}", info.last if other_metrics.include? name + output "#{config[:scheme]}.#{name}", info.first if other_metrics.include? name end if cpu_count > 0 # writes the number of cpus, the minus 1 is because /proc/stat/ # first line is a "cpu" which is stats for total cpus output "#{config[:scheme]}.cpu_count", cpu_count - 1