class Object

Constants

InvalidProcessNameError

Public Instance Methods

beanstalk(params) click to toggle source
# File lib/monitor_type/beanstalk.rb, line 34
def beanstalk(params)
  require 'beanstalk-client'
  $a.add(MonitorTypeBeanstalk.new(params))
end
dir(params) click to toggle source
# File lib/monitor_type/dir.rb, line 43
def dir(params)
  $a.add(MonitorTypeDir.new(params))
end
fluiddb(params) click to toggle source
# File lib/monitor_type/fluiddb.rb, line 68
def fluiddb(params)
  require 'fluiddb2'
  $a.add(MonitorTypeFluidDb.new(params))
end
httpgetjsonlist(params) click to toggle source
# File lib/monitor_type/http_get_json_list.rb, line 50
def httpgetjsonlist(params)
  require 'restclient'
  $a.add(MonitorTypeHttpGetJsonList.new(params))
end
log(string, verbose = false) click to toggle source
# File lib/helper_functions.rb, line 1
def log(string, verbose = false)
  return if ENV['TESTING'] == 'true'

  if !ENV['VERBOSE'].nil? || verbose == false
    type = verbose ? 'VERB' : 'INFO'
    timestamp = Time.new.strftime('%Y-%m-%d %H:%M:%S')
    puts "[#{type}] #{timestamp} :: #{string}"
  end
end
process(params) click to toggle source
# File lib/monitor_type/drive.rb, line 47
def process(params)
  $a.add(MonitorTypeDrive.new(params))
end