From 2455a32780ceadd68d356b194275279046052ae1 Mon Sep 17 00:00:00 2001 From: Paul Beers Date: Thu, 8 Jun 2017 16:45:33 +0200 Subject: ironware.rb changed to Fix ADX's reporting fan speeds --- lib/oxidized/model/ironware.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb index 9715c65..f4f9f36 100644 --- a/lib/oxidized/model/ironware.rb +++ b/lib/oxidized/model/ironware.rb @@ -34,6 +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! /Fan [1-6] - STATUS: OK [A-Z()[0-9] :-]{0,30}/, '' # Fix for ADX Fan speed reporting cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)(<->([\[]*)3([\]]*))*/, '' cfg.gsub! /\d{2}\.\d deg-C/, 'XX.X deg-C' if cfg.include? "TEMPERATURE" -- cgit v1.2.1 From 2e74e3fb2a9369beba64be0176c9d89e91f37bf0 Mon Sep 17 00:00:00 2001 From: Paul Beers Date: Fri, 9 Jun 2017 10:13:02 +0200 Subject: Fixed ADX temperature reporting --- lib/oxidized/model/ironware.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb index f4f9f36..ee45e32 100644 --- a/lib/oxidized/model/ironware.rb +++ b/lib/oxidized/model/ironware.rb @@ -35,6 +35,7 @@ class IronWare < Oxidized::Model 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! /Fan [1-6] - STATUS: OK [A-Z()[0-9] :-]{0,30}/, '' # Fix for ADX Fan speed reporting + cfg.gsub! /[0-9][0-9] deg C/, '' # Fix for ADX temperature reporting cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)(<->([\[]*)3([\]]*))*/, '' cfg.gsub! /\d{2}\.\d deg-C/, 'XX.X deg-C' if cfg.include? "TEMPERATURE" -- cgit v1.2.1 From 6f2da873140359a598fda47c13a963a0d9d290cb Mon Sep 17 00:00:00 2001 From: Paul Beers Date: Fri, 9 Jun 2017 13:45:13 +0200 Subject: Removed bytes from show flash --- lib/oxidized/model/ironware.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb index ee45e32..af8d19e 100644 --- a/lib/oxidized/model/ironware.rb +++ b/lib/oxidized/model/ironware.rb @@ -52,6 +52,7 @@ class IronWare < Oxidized::Model end cmd 'show flash' do |cfg| + cfg.gsub! /(\d+) bytes/, '' # Fix for ADX flash size comment cfg end -- cgit v1.2.1 From 95a86980e0ae13103bfcafec5ad097a6017f037a Mon Sep 17 00:00:00 2001 From: Paul Beers Date: Fri, 9 Jun 2017 14:25:28 +0200 Subject: Improved regexp --- lib/oxidized/model/ironware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb index af8d19e..4facb30 100644 --- a/lib/oxidized/model/ironware.rb +++ b/lib/oxidized/model/ironware.rb @@ -35,7 +35,7 @@ class IronWare < Oxidized::Model 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! /Fan [1-6] - STATUS: OK [A-Z()[0-9] :-]{0,30}/, '' # Fix for ADX Fan speed reporting - cfg.gsub! /[0-9][0-9] deg C/, '' # Fix for ADX temperature reporting + cfg.gsub! /\d* deg C/, '' # Fix for ADX temperature reporting cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)(<->([\[]*)3([\]]*))*/, '' cfg.gsub! /\d{2}\.\d deg-C/, 'XX.X deg-C' if cfg.include? "TEMPERATURE" -- cgit v1.2.1 From c813007a8c1414c70f13e7cfd243ae1334541929 Mon Sep 17 00:00:00 2001 From: Paul Beers Date: Fri, 9 Jun 2017 14:30:38 +0200 Subject: Improve regexp --- lib/oxidized/model/ironware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb index 4facb30..3ab8da1 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! /Fan [1-6] - STATUS: OK [A-Z()[0-9] :-]{0,30}/, '' # Fix for ADX Fan speed reporting + cfg.gsub! /Fan \d* - STATUS: OK \D*\d*./, '' # Fix for ADX Fan speed reporting cfg.gsub! /\d* deg C/, '' # Fix for ADX temperature reporting cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)(<->([\[]*)3([\]]*))*/, '' cfg.gsub! /\d{2}\.\d deg-C/, 'XX.X deg-C' -- cgit v1.2.1