Module: NeetoMonitorRuby

Extended by:
Forwardable, NeetoMonitorRuby
Included in:
NeetoMonitorRuby
Defined in:
lib/neeto_monitor_ruby/plugin.rb,
lib/neeto_monitor_ruby/monitor.rb,
lib/neeto_monitor_ruby/version.rb,
lib/neeto_monitor_ruby/init/rails.rb,
lib/neeto_monitor_ruby/configuration.rb,
lib/neeto_monitor_ruby/monitor_utils.rb,
lib/neeto_monitor_ruby/neeto_monitor.rb,
lib/neeto_monitor_ruby/plugins/sidekiq.rb,
lib/neeto_monitor_ruby/heartbeat_runner_job.rb

Defined Under Namespace

Modules: Init, MonitorUtils, Plugins Classes: Configuration, ConfigurationError, HeartbeatRunnerJob, Monitor, Plugin

Constant Summary collapse

VERSION =
"1.0.42".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config.



11
12
13
# File 'lib/neeto_monitor_ruby/neeto_monitor.rb', line 11

def config
  @config
end

#loggerObject

Returns the value of attribute logger.



11
12
13
# File 'lib/neeto_monitor_ruby/neeto_monitor.rb', line 11

def logger
  @logger
end

Instance Method Details

#init!(options = {}) ⇒ Object



15
16
17
18
# File 'lib/neeto_monitor_ruby/neeto_monitor.rb', line 15

def init!(options = {})
  self.config = Configuration.configure!(options, true)
  self.logger = self.config.logger
end

#load_plugins!Object



20
21
22
23
24
25
# File 'lib/neeto_monitor_ruby/neeto_monitor.rb', line 20

def load_plugins!
  Dir[File.expand_path("../plugins/*.rb", __FILE__)].each do |plugin|
    require plugin
  end
  Plugin.load!(self.config)
end