Module: Opstat::Plugins
- Extended by:
- Logging
- Defined in:
- lib/opstat-client/plugins.rb
Defined Under Namespace
Classes: Task
Class Method Summary collapse
-
.create_plugins(queue) ⇒ Object
task_command - u analyze output of the command, task_parse - just parse the file in /proc or other.
Methods included from Logging
log_level, oplogger, preconfig_logger
Class Method Details
.create_plugins(queue) ⇒ Object
task_command - u analyze output of the command, task_parse - just parse the file in /proc or other
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/opstat-client/plugins.rb', line 6 def self.create_plugins(queue) plugins = [] Opstat::Config.instance.get('plugins').each_pair do |name, conf| conf['log_level'] ||= Opstat::Config.instance.get('client')['log_level'] oplogger.info "Loading #{name} plugin with properties #{conf.inspect}" Opstat::Plugins.load_plugin(name) plugin_name = name class_name = "Opstat::Plugins::#{name}" task = Opstat::Common.constantize(class_name).new(plugin_name, queue, conf) plugins << task end plugins end |