summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
authorElvin Efendi <elvin.efendiev@shopify.com>2015-11-23 13:32:17 -0500
committerElvin Efendi <elvin.efendiev@shopify.com>2015-11-23 13:32:17 -0500
commit6b47e7122ea9e8f470c30335d4bcb588ed279a18 (patch)
treefbefa5c7624cacb2bbccdc5a84728e9a0408d6f4 /lib/oxidized/model
parent26b02bf064c76d6ef7943016c798629810986092 (diff)
ignore frequently changing monitoring data
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r--lib/oxidized/model/junos.rb13
1 files changed, 11 insertions, 2 deletions
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<stripped>\3')
+ cfg.gsub!(/(\s+\d+ days,)(.+seconds)/, '\1 <stripped>\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<stripped>\3')
+ cfg.gsub!(/(\s+\d+ days,)(.+seconds)/, '\1 <stripped>\3')
+ cfg.gsub!(/(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)(\s+)(\d+\.\d+)/, '\1<stripped>\3<stripped>\5<stripped>')
+ 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 }