Module: LitmusPaper
- Extended by:
- Forwardable
- Defined in:
- lib/litmus_paper.rb,
lib/litmus_paper/app.rb,
lib/litmus_paper/util.rb,
lib/litmus_paper/cache.rb,
lib/litmus_paper/health.rb,
lib/litmus_paper/logger.rb,
lib/litmus_paper/service.rb,
lib/litmus_paper/version.rb,
lib/litmus_paper/cli/admin.rb,
lib/litmus_paper/cli/server.rb,
lib/litmus_paper/status_file.rb,
lib/litmus_paper/haproxy_util.rb,
lib/litmus_paper/configuration.rb,
lib/litmus_paper/metric/script.rb,
lib/litmus_paper/cli/admin/list.rb,
lib/litmus_paper/dependency/tcp.rb,
lib/litmus_paper/cli/admin/force.rb,
lib/litmus_paper/cli/agent_check.rb,
lib/litmus_paper/dependency/http.rb,
lib/litmus_paper/metric/cpu_load.rb,
lib/litmus_paper/terminal_output.rb,
lib/litmus_paper/cli/admin/status.rb,
lib/litmus_paper/cli/admin/command.rb,
lib/litmus_paper/dependency/script.rb,
lib/litmus_paper/agent_check_server.rb,
lib/litmus_paper/configuration_file.rb,
lib/litmus_paper/agent_check_handler.rb,
lib/litmus_paper/metric/constant_metric.rb,
lib/litmus_paper/metric/internet_health.rb,
lib/litmus_paper/multi_port_agent_server.rb,
lib/litmus_paper/dependency/file_contents.rb,
lib/litmus_paper/single_port_agent_server.rb,
lib/litmus_paper/metric/socket_utilization.rb,
lib/litmus_paper/metric/big_brother_service.rb,
lib/litmus_paper/dependency/haproxy_backends.rb,
lib/litmus_paper/metric/tcp_socket_utilization.rb,
lib/litmus_paper/metric/haproxy_backends_health.rb,
lib/litmus_paper/metric/unix_socket_utilization.rb
Defined Under Namespace
Modules: AgentCheckServer, CLI, Dependency, HaproxyUtil, Metric
Classes: AgentCheckHandler, App, Cache, Configuration, ConfigurationFile, Health, Logger, MultiPortAgentServer, Service, SinglePortAgentServer, StatusFile, TerminalOutput, Util
Constant Summary
collapse
- VERSION =
"1.6.2"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.logger ⇒ Object
Returns the value of attribute logger.
46
47
48
|
# File 'lib/litmus_paper.rb', line 46
def logger
@logger
end
|
Class Method Details
.check_service(service_name) ⇒ Object
51
52
53
54
55
56
57
|
# File 'lib/litmus_paper.rb', line 51
def self.check_service(service_name)
if service = services[service_name]
service.current_health
else
nil
end
end
|
59
60
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/litmus_paper.rb', line 59
def self.configure(filename = nil)
@config_file = if filename
filename
elsif ENV['LITMUS_CONFIG'] && File.exists?(ENV['LITMUS_CONFIG'])
ENV['LITMUS_CONFIG']
elsif File.exists?('/etc/litmus.conf')
'/etc/litmus.conf'
else
raise "No litmus configuration file"
end
@config = LitmusPaper::ConfigurationFile.new(@config_file).evaluate
end
|
.reload ⇒ Object
72
73
74
75
76
77
78
79
80
|
# File 'lib/litmus_paper.rb', line 72
def self.reload
LitmusPaper.logger.info "Reloading configuration"
begin
configure(@config_file)
rescue Exception => e
LitmusPaper.logger.error "Problem reloading config: #{e.message}"
LitmusPaper.logger.error e.backtrace.join("\n")
end
end
|