Module: Zabbirc
- Defined in:
- lib/zabbirc.rb,
lib/zabbirc/op.rb,
lib/zabbirc/logger.rb,
lib/zabbirc/op_list.rb,
lib/zabbirc/service.rb,
lib/zabbirc/setting.rb,
lib/zabbirc/irc/help.rb,
lib/zabbirc/priority.rb,
lib/zabbirc/irc/plugin.rb,
lib/zabbirc/zabbix/host.rb,
lib/zabbirc/zabbix/user.rb,
lib/zabbirc/services/ops.rb,
lib/zabbirc/zabbix/event.rb,
lib/zabbirc/configuration.rb,
lib/zabbirc/services/base.rb,
lib/zabbirc/zabbix/trigger.rb,
lib/zabbirc/services/events.rb,
lib/zabbirc/zabbix/connection.rb,
lib/zabbirc/irc/plugin_methods.rb,
lib/zabbirc/zabbix/resource/base.rb,
lib/zabbirc/zabbix/resource/finders.rb,
lib/zabbirc/zabbix/resource/associations.rb
Defined Under Namespace
Modules: Irc, Logger, Services, Zabbix
Classes: Configuration, Op, OpList, Priority, Service, Setting
Constant Summary
collapse
- LIB_DATA_DIR =
Pathname.new("/usr/local/zabbirc")
- STORED_SETTINGS_FILE =
Zabbirc::LIB_DATA_DIR.join("ops_settings.yaml")
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
10
11
12
|
# File 'lib/zabbirc/configuration.rb', line 10
def self.config
@config
end
|
6
7
8
|
# File 'lib/zabbirc/configuration.rb', line 6
def self.configure(&block)
block.call(@config ||= Zabbirc::Configuration.new)
end
|
.logger ⇒ Object
2
3
4
5
6
|
# File 'lib/zabbirc/logger.rb', line 2
def self.logger
@logger ||= ::Logger.new(STDERR, 10, 1.megabyte).tap do |logger|
logger.formatter = Zabbirc::Logger::Formatter.new
end
end
|
.synchronize(&block) ⇒ Object
16
17
18
19
|
# File 'lib/zabbirc.rb', line 16
def self.synchronize &block
@mutex ||= Mutex.new
@mutex.synchronize &block
end
|