summaryrefslogtreecommitdiff
path: root/lib/oxidized/input/telnet.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2017-07-07 14:05:48 +0300
committerSaku Ytti <saku@ytti.fi>2017-07-07 14:05:48 +0300
commit72a6619986086df4d8db876ca0424f6bb6671b1b (patch)
treec248aae3c2f57bf228eb2884091d3d84a66c84da /lib/oxidized/input/telnet.rb
parent776386ea339b53b90284acf123e0dce5758b901c (diff)
add pre_loginfeature-pre_login
Diffstat (limited to 'lib/oxidized/input/telnet.rb')
-rw-r--r--lib/oxidized/input/telnet.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb
index a5561b9..2b0a440 100644
--- a/lib/oxidized/input/telnet.rb
+++ b/lib/oxidized/input/telnet.rb
@@ -19,6 +19,9 @@ module Oxidized
opt['Output_log'] = Oxidized::Config::Log + "/#{@node.ip}-telnet" if Oxidized.config.input.debug?
@telnet = Net::Telnet.new opt
+ end
+
+ def login
if @node.auth[:username] and @node.auth[:username].length > 0
expect username
@telnet.puts @node.auth[:username]