Module: AppPerfAgent

Defined in:
lib/app_perf_agent.rb,
lib/app_perf_agent/cli.rb,
lib/app_perf_agent/types.rb,
lib/app_perf_agent/logger.rb,
lib/app_perf_agent/plugin.rb,
lib/app_perf_agent/worker.rb,
lib/app_perf_agent/dispatcher.rb,
lib/app_perf_agent/plugin/base.rb,
lib/app_perf_agent/plugin/system/cpu.rb,
lib/app_perf_agent/plugin/system/disk.rb,
lib/app_perf_agent/plugin/system/load.rb,
lib/app_perf_agent/plugin/system/memory.rb,
lib/app_perf_agent/plugin/system/network.rb

Defined Under Namespace

Modules: Plugin, Types Classes: CLI, Dispatcher, Logger, Worker

Constant Summary collapse

DEFAULTS =
{
  environment: nil,
  daemon: false,
  host: 'localhost:5000',
  ssl: false,
  license_key: '',
  pidfile: File.dirname(__FILE__) + "/../app_perf_agent.pid"
}

Class Method Summary collapse

Class Method Details

.hostnameObject



17
18
19
# File 'lib/app_perf_agent.rb', line 17

def self.hostname
  @hostname ||= Socket.gethostname
end

.loadObject



38
39
40
# File 'lib/app_perf_agent.rb', line 38

def load
  AppPerfAgent::Agent::Plugin.load_plugins
end

.loggerObject



29
30
31
# File 'lib/app_perf_agent.rb', line 29

def self.logger
  AppPerfAgent::Logger.logger
end

.logger=(log) ⇒ Object



33
34
35
# File 'lib/app_perf_agent.rb', line 33

def self.logger=(log)
  AppPerfAgent::Logger.logger = log
end

.optionsObject



21
22
23
# File 'lib/app_perf_agent.rb', line 21

def self.options
  @options ||= DEFAULTS.dup
end

.options=(opts) ⇒ Object



25
26
27
# File 'lib/app_perf_agent.rb', line 25

def self.options=(opts)
  @options = opts
end