From 5a4d2ce1a0380a47e51a9c7aa248e82a5ba5cd39 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sun, 21 Apr 2013 16:37:26 +0300 Subject: Add input method fallback, e.g. if ssh does not work, try telnet --- lib/oxidized/input/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/input') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 45c89ba..3471eea 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -12,7 +12,7 @@ module Oxidized begin @ssh = Net::SSH.start @node.ip, @node.auth[:username], :password => @node.auth[:password], :timeout => CFG.timeout - rescue Timeout::Error, Net::SSH::Disconnect + rescue Timeout::Error, Net::SSH::Disconnect, Errno::ECONNREFUSED return false end @ses = open_shell @ssh unless @exec -- cgit v1.2.1