diff options
Diffstat (limited to 'lib/oxidized/input')
-rw-r--r-- | lib/oxidized/input/input.rb | 18 | ||||
-rw-r--r-- | lib/oxidized/input/ssh.rb | 14 | ||||
-rw-r--r-- | lib/oxidized/input/telnet.rb | 4 |
3 files changed, 22 insertions, 14 deletions
diff --git a/lib/oxidized/input/input.rb b/lib/oxidized/input/input.rb index d59c4f3..61f4634 100644 --- a/lib/oxidized/input/input.rb +++ b/lib/oxidized/input/input.rb @@ -1,12 +1,16 @@ module Oxidized class Input - RescueFail = [ - Timeout::Error, - Errno::ECONNREFUSED, - Errno::ECONNRESET, - Errno::EHOSTUNREACH, - Errno::EPIPE, - ] + RescueFail = { + :debug => [ + Errno::ECONNREFUSED, + ], + :warn => [ + Timeout::Error, + Errno::ECONNRESET, + Errno::EHOSTUNREACH, + Errno::EPIPE, + ], + } class << self def inherited klass Oxidized.mgr.loader = { :class => klass } diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 3fdaa70..67be180 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -2,11 +2,15 @@ module Oxidized require 'net/ssh' require 'oxidized/input/cli' class SSH < Input - RescueFail = [ - Net::SSH::Disconnect, - Net::SSH::AuthenticationFailed, - RuntimeError, - ] + RescueFail = { + :debug => [ + Net::SSH::Disconnect, + ], + :warn => [ + RuntimeError, + Net::SSH::AuthenticationFailed, + ], + } include CLI class NoShell < StandardError; end diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb index 0ae6877..31ed8d0 100644 --- a/lib/oxidized/input/telnet.rb +++ b/lib/oxidized/input/telnet.rb @@ -2,8 +2,8 @@ module Oxidized require 'net/telnet' require 'oxidized/input/cli' class Telnet < Input - RescueFail = [] - include CLI + RescueFail = {} + include CLI attr_reader :telnet def connect node |