diff options
author | devicenull <devicenull@users.noreply.github.com> | 2017-01-18 17:17:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 17:17:09 -0500 |
commit | 34725454fe631bdd3ca790bb7ce0c71fa679f3ff (patch) | |
tree | 005d0507e12d95b384151d8bbd15221721d35512 /lib/oxidized/model | |
parent | 1b7b5e63037465774c126223ec2f63b1cc88dc5d (diff) |
Update ironware.rb
Some Brocade devices only have two possible fan speeds. Previously, this only handled three levels of fan speeds. Updated regex will handle both of these cases:
Fan 1 ok, speed (auto): 1<->[[2]]
Fan 1 ok, speed (auto): 1<->[[2]]<->3
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/ironware.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb index e1c6da1..5b58f22 100644 --- a/lib/oxidized/model/ironware.rb +++ b/lib/oxidized/model/ironware.rb @@ -34,7 +34,7 @@ class IronWare < Oxidized::Model 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}\%\)/, '' - cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)<->([\[]*)3([\]]*)/, '' + cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)(<->([\[]*)3([\]]*))*/, '' cfg.gsub! /\d{2}\.\d deg-C/, 'XX.X deg-C' if cfg.include? "TEMPERATURE" sc = StringScanner.new cfg |