Module: Bosh::Monitor
- Defined in:
- lib/bosh/monitor/plugins/resurrector.rb,
lib/bosh/monitor.rb,
lib/bosh/monitor/agent.rb,
lib/bosh/monitor/config.rb,
lib/bosh/monitor/errors.rb,
lib/bosh/monitor/metric.rb,
lib/bosh/monitor/runner.rb,
lib/bosh/monitor/version.rb,
lib/bosh/monitor/director.rb,
lib/bosh/monitor/events/base.rb,
lib/bosh/monitor/yaml_helper.rb,
lib/bosh/monitor/events/alert.rb,
lib/bosh/monitor/plugins/base.rb,
lib/bosh/monitor/plugins/nats.rb,
lib/bosh/monitor/plugins/tsdb.rb,
lib/bosh/monitor/agent_manager.rb,
lib/bosh/monitor/auth_provider.rb,
lib/bosh/monitor/plugins/dummy.rb,
lib/bosh/monitor/plugins/email.rb,
lib/bosh/monitor/api_controller.rb,
lib/bosh/monitor/plugins/logger.rb,
lib/bosh/monitor/event_processor.rb,
lib/bosh/monitor/plugins/datadog.rb,
lib/bosh/monitor/director_monitor.rb,
lib/bosh/monitor/events/heartbeat.rb,
lib/bosh/monitor/plugins/graphite.rb,
lib/bosh/monitor/plugins/pagerduty.rb,
lib/bosh/monitor/plugins/cloud_watch.rb,
lib/bosh/monitor/protocols/tcp_connection.rb,
lib/bosh/monitor/protocols/tsdb_connection.rb,
lib/bosh/monitor/protocols/graphite_connection.rb,
lib/bosh/monitor/plugins/consul_event_forwarder.rb,
lib/bosh/monitor/plugins/syslog_event_forwarder.rb
Overview
Consul Bosh Monitor Plugin Forwards alert and heartbeat messages as events to a consul agent
Defined Under Namespace
Modules: Events, Plugins, YamlHelper Classes: Agent, AgentManager, ApiController, AuthProvider, ConfigError, ConnectionError, Director, DirectorError, DirectorMonitor, Error, EventProcessingError, EventProcessor, FatalError, GraphiteConnection, InvalidEvent, Metric, PluginError, Runner, TcpConnection, TsdbConnection, UAAToken
Constant Summary collapse
- VERSION =
'1.3262.24.0'
Class Attribute Summary collapse
-
.agent_manager ⇒ Object
Returns the value of attribute agent_manager.
-
.director ⇒ Object
Returns the value of attribute director.
-
.em_threadpool_size ⇒ Object
Returns the value of attribute em_threadpool_size.
-
.event_mbus ⇒ Object
Returns the value of attribute event_mbus.
-
.event_processor ⇒ Object
Returns the value of attribute event_processor.
-
.http_port ⇒ Object
Returns the value of attribute http_port.
-
.intervals ⇒ Object
Returns the value of attribute intervals.
-
.logger ⇒ Object
Returns the value of attribute logger.
-
.mbus ⇒ Object
Returns the value of attribute mbus.
-
.nats ⇒ Object
Returns the value of attribute nats.
-
.plugins ⇒ Object
Returns the value of attribute plugins.
Class Method Summary collapse
Class Attribute Details
.agent_manager ⇒ Object
Returns the value of attribute agent_manager.
11 12 13 |
# File 'lib/bosh/monitor/config.rb', line 11 def agent_manager @agent_manager end |
.director ⇒ Object
Returns the value of attribute director.
6 7 8 |
# File 'lib/bosh/monitor/config.rb', line 6 def director @director end |
.em_threadpool_size ⇒ Object
Returns the value of attribute em_threadpool_size.
9 10 11 |
# File 'lib/bosh/monitor/config.rb', line 9 def em_threadpool_size @em_threadpool_size end |
.event_mbus ⇒ Object
Returns the value of attribute event_mbus.
10 11 12 |
# File 'lib/bosh/monitor/config.rb', line 10 def event_mbus @event_mbus end |
.event_processor ⇒ Object
Returns the value of attribute event_processor.
12 13 14 |
# File 'lib/bosh/monitor/config.rb', line 12 def event_processor @event_processor end |
.http_port ⇒ Object
Returns the value of attribute http_port.
14 15 16 |
# File 'lib/bosh/monitor/config.rb', line 14 def http_port @http_port end |
.intervals ⇒ Object
Returns the value of attribute intervals.
7 8 9 |
# File 'lib/bosh/monitor/config.rb', line 7 def intervals @intervals end |
.logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/bosh/monitor/config.rb', line 5 def logger @logger end |
.mbus ⇒ Object
Returns the value of attribute mbus.
8 9 10 |
# File 'lib/bosh/monitor/config.rb', line 8 def mbus @mbus end |
.nats ⇒ Object
Returns the value of attribute nats.
17 18 19 |
# File 'lib/bosh/monitor/config.rb', line 17 def nats @nats end |
.plugins ⇒ Object
Returns the value of attribute plugins.
15 16 17 |
# File 'lib/bosh/monitor/config.rb', line 15 def plugins @plugins end |
Class Method Details
.config=(config) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/bosh/monitor/config.rb', line 19 def config=(config) validate_config(config) @logger = Logging.logger(config["logfile"] || STDOUT) @intervals = OpenStruct.new(config["intervals"]) @director = Director.new(config["director"], @logger) @mbus = OpenStruct.new(config["mbus"]) @em_threadpool_size = config["em_threadpool_size"] @event_processor = EventProcessor.new @agent_manager = AgentManager.new(event_processor) # Interval defaults @intervals.prune_events ||= 30 @intervals.poll_director ||= 60 @intervals.poll_grace_period ||= 30 @intervals.log_stats ||= 60 @intervals.analyze_agents ||= 60 @intervals.agent_timeout ||= 60 @intervals.rogue_agent_alert ||= 120 if config["http"].is_a?(Hash) @http_port = config["http"]["port"] end if config["event_mbus"] @event_mbus = OpenStruct.new(config["event_mbus"]) end if config["loglevel"].is_a?(String) @logger.level = config["loglevel"].to_sym end if config["plugins"].is_a?(Enumerable) @plugins = config["plugins"] end end |
.validate_config(config) ⇒ Object
58 59 60 61 62 |
# File 'lib/bosh/monitor/config.rb', line 58 def validate_config(config) unless config.is_a?(Hash) raise ConfigError, "Invalid config format, Hash expected, #{config.class} given" end end |