From d0736c757645694ed255e060c5eab45c21f9ffa6 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Mon, 7 Dec 2015 09:22:36 -0500 Subject: bug fix --- lib/oxidized/model/junos.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/model/junos.rb') diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb index a02d588..1b641ca 100644 --- a/lib/oxidized/model/junos.rb +++ b/lib/oxidized/model/junos.rb @@ -54,7 +54,8 @@ class JunOS < Oxidized::Model end cmd('show chassis hardware detail') { |cfg| comment cfg } cmd('show chassis routing-engine') do |cfg| - cfg.gsub!(/(\S+\s+)(\d+)( percent)/, '\1\3') + cfg.gsub!(/(\S+\s+)(\d{2})( percent)/, '\1\3') + cfg.gsub!(/(\S+\s+)(\s\d{1})( percent)/, '\1\3') cfg.gsub!(/(\s+\d+ days,)(.+seconds)/, '\1 \3') cfg.gsub!(/(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)/, '\1\3\5') comment cfg -- cgit v1.2.1