diff options
Diffstat (limited to 'lib/oxidized/model/procurve.rb')
-rw-r--r-- | lib/oxidized/model/procurve.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/model/procurve.rb b/lib/oxidized/model/procurve.rb index e667f48..0dc6f8f 100644 --- a/lib/oxidized/model/procurve.rb +++ b/lib/oxidized/model/procurve.rb @@ -2,7 +2,7 @@ class Procurve < Oxidized::Model # some models start lines with \r # previous command is repeated followed by "\eE", which sometimes ends up on last line - prompt /^\r?([\w -]+\eE)?([\w-]+# )$/ + prompt /^\r?([\w -]+\eE)?([\w.-]+# )$/ comment '! ' @@ -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 |