Class: Pandur::Host
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(target) ⇒ Host
constructor
A new instance of Host.
Methods included from Config
#config, #load_config, #logger
Constructor Details
#initialize(target) ⇒ Host
Returns a new instance of Host.
8 9 10 |
# File 'lib/pandur/host.rb', line 8 def initialize(target) @config = target end |
Instance Method Details
#check ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/pandur/host.rb', line 12 def check logger.debug("Connecting to #{@config['username']}@#{@config['hostname']}") Net::SSH.start(@config['hostname'], @config['username'], :password => @config['password']) do |ssh| @config['check'].each do |check| Pandur::Check.new(check).check(ssh) end end end |