Module: Zabbix
- Defined in:
- lib/zabbix.rb,
lib/zabbix/config.rb,
lib/zabbix/reader.rb,
lib/zabbix/monitor.rb
Overview
Zabbix Monitor
Defined Under Namespace
Classes: Config, FileNotFoundError, Monitor, Reader
Class Method Summary collapse
-
.config ⇒ Zabbix::Config
Creates a new or returns the existing the zabbix-monitor config.
-
.configure {|config| ... } ⇒ Object
Call this method to modify defaults in your initializers.
-
.logger ⇒ Yell
Creates a new or returns the
Yell
logger instance. - .run ⇒ Object
Class Method Details
.config ⇒ Zabbix::Config
Returns creates a new or returns the existing the zabbix-monitor config.
37 38 39 |
# File 'lib/zabbix.rb', line 37 def config @config ||= Config.new end |
.configure {|config| ... } ⇒ Object
Call this method to modify defaults in your initializers.
32 33 34 |
# File 'lib/zabbix.rb', line 32 def configure yield config end |
.logger ⇒ Yell
Returns creates a new or returns the Yell
logger instance.
46 47 48 49 50 |
# File 'lib/zabbix.rb', line 46 def logger @logger ||= Yell.new do |l| l.adapter self.config.log_adapter, :filename => self.config.log_file_path, :symlink => false end end |
.run ⇒ Object
41 42 43 |
# File 'lib/zabbix.rb', line 41 def run File.exist?(config.config_file_path) end |