Class: Bosh::Monitor::Plugins::Varz

Inherits:
Base
  • Object
show all
Defined in:
lib/bosh/monitor/plugins/varz.rb

Instance Attribute Summary

Attributes inherited from Base

#event_kinds, #logger, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #validate_options

Constructor Details

This class inherits a constructor from Bosh::Monitor::Plugins::Base

Instance Method Details

#process(event) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/bosh/monitor/plugins/varz.rb', line 8

def process(event)
  @agents ||= {}
  @agents[event.kind] ||= {}
  agent_id = event.attributes["agent_id"] || "unknown"
  @agents[event.kind][agent_id.to_s] = event.to_hash
  Bhm.set_varz("last_agents_" + event.kind.to_s, @agents[event.kind])
end

#runObject



4
5
6
# File 'lib/bosh/monitor/plugins/varz.rb', line 4

def run
  logger.info("Varz plugin is running...")
end