summaryrefslogtreecommitdiff
path: root/lib/oxidized/input/ssh.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-02-10 12:26:59 +0200
committerSaku Ytti <saku@ytti.fi>2014-02-10 12:26:59 +0200
commit227ea783d3598c2bd974cdaf4aac8c255870e264 (patch)
treeac3af5a9473fb06bda8bbbb6a30c01c453f0dfe8 /lib/oxidized/input/ssh.rb
parent92fbaa712c99ae5b523be0ebbc46fca9cdddef4e (diff)
Handle exceptions with different log levels
Diffstat (limited to 'lib/oxidized/input/ssh.rb')
-rw-r--r--lib/oxidized/input/ssh.rb14
1 files changed, 9 insertions, 5 deletions
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