Top Level Namespace
Defined Under Namespace
Classes: Alert, AlertEmail, MonitorManager, MonitorType, MonitorTypeBeanstalk, MonitorTypeDir, MonitorTypeDrive, MonitorTypeExceptionHandled, MonitorTypeFluidDb, MonitorTypeHttpGetJsonList, MonitorTypeMustHaveNameError, MonitorTypeMustHaveSenderEmailAddressForEmailAlertError, MonitorTypeParameterMissingError, MonitorTypeProcess, MonitorTypeThreshold
Constant Summary
collapse
- InvalidProcessNameError =
Class.new(StandardError)
Instance Method Summary
collapse
Instance Method Details
#beanstalk(params) ⇒ Object
34
35
36
37
|
# File 'lib/monitor_type/beanstalk.rb', line 34
def beanstalk(params)
require 'beanstalk-client'
$a.add(MonitorTypeBeanstalk.new(params))
end
|
#dir(params) ⇒ Object
43
44
45
|
# File 'lib/monitor_type/dir.rb', line 43
def dir(params)
$a.add(MonitorTypeDir.new(params))
end
|
#fluiddb(params) ⇒ Object
68
69
70
71
|
# File 'lib/monitor_type/fluiddb.rb', line 68
def fluiddb(params)
require 'fluiddb2'
$a.add(MonitorTypeFluidDb.new(params))
end
|
#httpgetjsonlist(params) ⇒ Object
50
51
52
53
|
# 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) ⇒ Object
1
2
3
4
5
6
7
8
9
|
# 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) ⇒ Object
47
48
49
|
# File 'lib/monitor_type/drive.rb', line 47
def process(params)
$a.add(MonitorTypeDrive.new(params))
end
|