From fb502a57b635d98fcafae14a36b9a6be5a5e51f2 Mon Sep 17 00:00:00 2001 From: Alexandre-io Date: Mon, 30 May 2016 19:52:39 +0200 Subject: Avoid commit if cpu, memory or received pkts change and handle cluster informations. --- lib/oxidized/model/procurve.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/procurve.rb b/lib/oxidized/model/procurve.rb index 392f510..0dc6f8f 100644 --- a/lib/oxidized/model/procurve.rb +++ b/lib/oxidized/model/procurve.rb @@ -40,7 +40,8 @@ class Procurve < Oxidized::Model # not supported on all models cmd 'show system information' do |cfg| - cfg = cfg.split("\n")[0..-8].join("\n") + cfg = cfg.each_line.select { |line| not line.match /(.*CPU.*)|(.*Up Time.*)|(.*Total.*)|(.*Free.*)|(.*Lowest.*)|(.*Missed.*)/ } + cfg = cfg.join comment cfg end -- cgit v1.2.1