Module: Nagios::MkLiveStatus

Overview

This module provides convenience methods to the application. It also can be initiated or changed by the user to change parameters

Author

Esco-lan Team ([email protected])

Copyright

Copyright © 2011 GIP RECIA

License

General Public Licence

Defined Under Namespace

Modules: Parser, QueryHelper Classes: Exception, Filter, Query, QueryException, Request, RequestException, Stats, Wait

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.init(options = {}) ⇒ Object

Initialize the nagios mklivestatus informations.

The parameter is a hash of options of MkLiveStatus :

  • :log : options to activate or change the logger, if none provided keep the current conf or default if logger is not set. For logger options see set_logger



31
32
33
34
35
36
37
38
# File 'lib/nagios_mklivestatus.rb', line 31

def self.init(options={})
    
  if options.has_key? :log
    self.set_logger(options[:log])
  elsif logger == nil
    self.set_logger()
  end
end

Instance Method Details

#loggerObject

logger helper while including if called and logger not created it will initialize the default logger



42
43
44
45
46
47
48
# File 'lib/nagios_mklivestatus.rb', line 42

def logger
  if Nagios::MkLiveStatus.logger
    Nagios::MkLiveStatus.init
  end
  
  Nagios::MkLiveStatus.logger
end