summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/ironware.rb
diff options
context:
space:
mode:
authordevicenull <devicenull@users.noreply.github.com>2017-01-09 16:32:48 -0500
committerGitHub <noreply@github.com>2017-01-09 16:32:48 -0500
commit853a1dd57776955c20377f6f13a5a71e892d89f0 (patch)
tree298d2badc708014a7c9a467475cc2591a4a8edf6 /lib/oxidized/model/ironware.rb
parent8b980c327adc0f92867ab2c44037543aa46b3c5f (diff)
Ignore undefined UTF8 in ironware.rb
We have some Brocade MLX devices that are triggering 'raised Encoding::UndefinedConversionError with msg ""\xFF" from ASCII-8BIT to UTF-8"'. Update the ironware.rb file to ignore undefined UTF8 as well as invalid UTF8
Diffstat (limited to 'lib/oxidized/model/ironware.rb')
-rw-r--r--lib/oxidized/model/ironware.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb
index db341d1..ade8b44 100644
--- a/lib/oxidized/model/ironware.rb
+++ b/lib/oxidized/model/ironware.rb
@@ -30,7 +30,7 @@ class IronWare < Oxidized::Model
end
cmd 'show chassis' do |cfg|
- cfg.encode!("UTF-8", :invalid => :replace) #sometimes ironware returns broken encoding
+ cfg.encode!("UTF-8", :invalid => :replace, :undef => :replace) #sometimes ironware returns broken encoding
cfg.gsub! /(^((.*)Current temp(.*))$)/, '' #remove unwanted lines current temperature
cfg.gsub! /Speed = [A-Z-]{2,6} \(\d{2,3}\%\)/, '' #remove unwanted lines Speed Fans
cfg.gsub! /current speed is [A-Z]{2,6} \(\d{2,3}\%\)/, ''