bosh-monitor 1.3010.0 → 1.3012.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c48dfba9060aa17851dbd6295dcd9e04fc1fc2b
4
- data.tar.gz: 03a7e4f6b1d2190eba288195e8fc8d2c18304fc2
3
+ metadata.gz: 62487ac6b0172fff57e088f5b5f9d99aae7448a6
4
+ data.tar.gz: a4ad3e5ff225d2363b9f72187805dab17c37448a
5
5
  SHA512:
6
- metadata.gz: d2b5ab98419607cadf9a254ff3851bbb82861b321ca1e5c1ff316d96e966892a8ef9b371b762e0429674cfdd0210c6eba275dd842488eea6082975c6c34ee1af
7
- data.tar.gz: 8f86e991151697d661b7870352e2f96c0d52264b16654822e9a164edcd849ceae4f08dafd720f754cecf873a76f042bbf6f6e167e1509ab504987c2f6642f52a
6
+ metadata.gz: 080c341c5942b5495188fad26ec13717801bdc3937d5deb7be622f8e2bba28c516e4501356b498d667fde09328bfed656fc76fc32918d34f61348082c82f180c
7
+ data.tar.gz: 9eaeb20dd17cfdbc2b54cfaaf6f11b3bde17ac96f5e9cabbcd594d50985a32a92391e8bebe1711628515935754f1ce54466c20040455cf81d4ab3d01b8710837
data/README.md CHANGED
@@ -6,7 +6,6 @@ The Monitor also includes a few primary components:
6
6
  - The Agent Monitor maintains a record of known agents (by heartbeat event subscription)
7
7
  - The Director Monitor maintains a record of known agents (by director HTTP polling).
8
8
  - The Agent Analyzer that analyzes agent state periodically and generates Alerts.
9
- - The HTTP Server that responds to the /varz endpoint
10
9
 
11
10
  The Monitor also supports generic event processing plugins that respond to Heartbeats & Alerts.
12
11
 
data/lib/bosh/monitor.rb CHANGED
@@ -74,5 +74,4 @@ require 'bosh/monitor/plugins/nats'
74
74
  require 'bosh/monitor/plugins/pagerduty'
75
75
  require 'bosh/monitor/plugins/resurrector'
76
76
  require 'bosh/monitor/plugins/tsdb'
77
- require 'bosh/monitor/plugins/varz'
78
77
  require 'bosh/monitor/plugins/consul_event_forwarder'
@@ -41,8 +41,6 @@ module Bosh::Monitor
41
41
  end
42
42
 
43
43
  def setup_events
44
- Bhm.set_varz("heartbeats_received", 0)
45
-
46
44
  @processor.enable_pruning(Bhm.intervals.prune_events)
47
45
  Bhm.plugins.each do |plugin|
48
46
  @processor.add_plugin(lookup_plugin(plugin["name"], plugin["options"]), plugin["events"])
@@ -274,7 +272,6 @@ module Bosh::Monitor
274
272
 
275
273
  @processor.process(:alert, message)
276
274
  @alerts_processed += 1
277
- Bhm.set_varz("alerts_processed", @alerts_processed)
278
275
  end
279
276
 
280
277
  def on_heartbeat(agent, message)
@@ -288,7 +285,6 @@ module Bosh::Monitor
288
285
 
289
286
  @processor.process(:heartbeat, message)
290
287
  @heartbeats_received += 1
291
- Bhm.set_varz("heartbeats_received", @heartbeats_received)
292
288
  end
293
289
 
294
290
  def on_shutdown(agent, message)
@@ -18,25 +18,6 @@ module Bosh::Monitor
18
18
  set(:dump_errors, false)
19
19
  end
20
20
 
21
- helpers do
22
- def protected!
23
- return if authorized?
24
- headers['WWW-Authenticate'] = ''
25
- halt 401, 'Unauthorized'
26
- end
27
-
28
- def authorized?
29
- @auth ||= Rack::Auth::Basic::Request.new(request.env)
30
- @auth.provided? and @auth.basic? and @auth.credentials and @auth.credentials == [Bhm.http_user, Bhm.http_password]
31
- end
32
- end
33
-
34
- get "/varz" do
35
- protected!
36
- content_type(:json)
37
- Yajl::Encoder.encode(Bhm.varz, :terminator => "\n")
38
- end
39
-
40
21
  get "/healthz" do
41
22
  body "Last pulse was #{Time.now - @heartbeat} seconds ago"
42
23
 
@@ -10,9 +10,8 @@ module Bosh::Monitor
10
10
  attr_accessor :agent_manager
11
11
  attr_accessor :event_processor
12
12
 
13
- attr_accessor :http_port, :http_user, :http_password
13
+ attr_accessor :http_port
14
14
  attr_accessor :plugins
15
- attr_accessor :varz
16
15
 
17
16
  attr_accessor :nats
18
17
 
@@ -27,8 +26,6 @@ module Bosh::Monitor
27
26
  @event_processor = EventProcessor.new
28
27
  @agent_manager = AgentManager.new(event_processor)
29
28
 
30
- @varz = {}
31
-
32
29
  # Interval defaults
33
30
  @intervals.prune_events ||= 30
34
31
  @intervals.poll_director ||= 60
@@ -40,8 +37,6 @@ module Bosh::Monitor
40
37
 
41
38
  if config["http"].is_a?(Hash)
42
39
  @http_port = config["http"]["port"]
43
- @http_user = config["http"]["user"]
44
- @http_password = config["http"]["password"]
45
40
  end
46
41
 
47
42
  if config["event_mbus"]
@@ -57,11 +52,6 @@ module Bosh::Monitor
57
52
  end
58
53
  end
59
54
 
60
- def set_varz(key, value)
61
- @varz ||= {}
62
- @varz[key] = value
63
- end
64
-
65
55
  def validate_config(config)
66
56
  unless config.is_a?(Hash)
67
57
  raise ConfigError, "Invalid config format, Hash expected, #{config.class} given"
@@ -95,8 +95,6 @@ module Bosh::Monitor
95
95
  def poll_director
96
96
  @logger.debug "Getting deployments from director..."
97
97
  Fiber.new { fetch_deployments }.resume
98
- Bhm.set_varz("deployments_count", @agent_manager.deployments_count)
99
- Bhm.set_varz("agents_count", @agent_manager.agents_count)
100
98
  end
101
99
 
102
100
  def analyze_agents
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Monitor
3
- VERSION = '1.3010.0'
3
+ VERSION = '1.3012.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3010.0
4
+ version: 1.3012.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-06 00:00:00.000000000 Z
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -208,7 +208,7 @@ dependencies:
208
208
  version: '0'
209
209
  description: |-
210
210
  BOSH Health Monitor
211
- 1dcc8d
211
+ 8d43aa
212
212
  email: support@cloudfoundry.com
213
213
  executables:
214
214
  - bosh-monitor-console
@@ -252,7 +252,6 @@ files:
252
252
  - lib/bosh/monitor/plugins/resurrector.rb
253
253
  - lib/bosh/monitor/plugins/resurrector_helper.rb
254
254
  - lib/bosh/monitor/plugins/tsdb.rb
255
- - lib/bosh/monitor/plugins/varz.rb
256
255
  - lib/bosh/monitor/protocols/graphite_connection.rb
257
256
  - lib/bosh/monitor/protocols/tcp_connection.rb
258
257
  - lib/bosh/monitor/protocols/tsdb_connection.rb
@@ -1,17 +0,0 @@
1
- module Bosh::Monitor
2
- module Plugins
3
- class Varz < Base
4
- def run
5
- logger.info("Varz plugin is running...")
6
- end
7
-
8
- def process(event)
9
- @agents ||= {}
10
- @agents[event.kind] ||= {}
11
- agent_id = event.attributes["agent_id"] || "unknown"
12
- @agents[event.kind][agent_id.to_s] = event.to_hash
13
- Bhm.set_varz("last_agents_" + event.kind.to_s, @agents[event.kind])
14
- end
15
- end
16
- end
17
- end