Module: NewRelic::Control::ServerMethods

Included in:
NewRelic::Control
Defined in:
lib/new_relic/control/server_methods.rb

Overview

Contains methods that deal with connecting to the server

Instance Method Summary collapse

Instance Method Details

#serverObject



14
15
16
# File 'lib/new_relic/control/server_methods.rb', line 14

def server
  @remote_server ||= server_from_host(nil)
end

#server_from_host(hostname = nil) ⇒ Object



18
19
20
# File 'lib/new_relic/control/server_methods.rb', line 18

def server_from_host(hostname = nil)
  NewRelic::Control::Server.new(hostname || Agent.config[:host], Agent.config[:port])
end