From 6b47e7122ea9e8f470c30335d4bcb588ed279a18 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Mon, 23 Nov 2015 13:32:17 -0500 Subject: ignore frequently changing monitoring data --- lib/oxidized/model/junos.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb index 949a757..a02d588 100644 --- a/lib/oxidized/model/junos.rb +++ b/lib/oxidized/model/junos.rb @@ -47,9 +47,18 @@ class JunOS < Oxidized::Model comment cfg end cmd('show chassis firmware') { |cfg| comment cfg } - cmd('show chassis fpc detail') { |cfg| comment cfg } + cmd('show chassis fpc detail') do |cfg| + cfg.gsub!(/(Temperature\s+)(\d+)(.+)/, '\1\3') + cfg.gsub!(/(\s+\d+ days,)(.+seconds)/, '\1 \3') + comment cfg + end cmd('show chassis hardware detail') { |cfg| comment cfg } - cmd('show chassis routing-engine') { |cfg| comment cfg } + cmd('show chassis routing-engine') do |cfg| + cfg.gsub!(/(\S+\s+)(\d+)( 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 + end cmd('show chassis alarms') { |cfg| comment cfg } cmd('show system license') { |cfg| comment cfg } cmd('show system boot-messages') { |cfg| comment cfg } -- cgit v1.2.1