sensu 0.25.3 → 0.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb6d18da6177df8e89c857130ca0ed9bcc6fbd84
4
- data.tar.gz: f14ab5690a7491100a070f4a21b705da0d05f69c
3
+ metadata.gz: 395c016d81d285d4638a986ed2e74f3a57eeee12
4
+ data.tar.gz: b1910e9c168985868d21960ece8dc89db4827814
5
5
  SHA512:
6
- metadata.gz: dd9083aff0b54daa2253cf3f4f9caa8a56702d45070c7fbaa6f966cc547d77f76d8b8c0410d1a8423d794cd814c571e2f1e36e6d95569c6912cc9eef8d69dc15
7
- data.tar.gz: b59e0aad3001b9432fc121735450e93ffe6587ad92988573f54b76ba14a153ea5667f7e2e794766c7fecc08166b8d3669f4c8c2884df3cd2966b09007ec06900
6
+ metadata.gz: d019339a148fb8ddc6f5bed53c39229ef5b2007ce80f8e20c63fcd26ca246180cd52fbcefe19dc1b8526fce5284ef80d79b5e5caede41af04e4d161eece9daab
7
+ data.tar.gz: f33ded0aae861eedefcb2260a2d0c8fca7356511db8f101ddb4d038099ddbb929b8537e703a1be9d460abf2bb6234ce552c7ef6ad4929a7f7777da842239ff07
@@ -1,3 +1,10 @@
1
+ ## 0.25.4 - 2016-06-20
2
+
3
+ ### Fixes
4
+
5
+ Fixed a race condition bug in the Sensu API where the `@redis` and
6
+ `@transport` objects were not initialized before serving API requests.
7
+
1
8
  ## 0.25.3 - 2016-06-17
2
9
 
3
10
  ### Fixes
@@ -0,0 +1,37 @@
1
+ {
2
+
3
+ "checks": {
4
+
5
+ "check_procs_slapd": {
6
+
7
+ "command": "/usr/local/nagios/libexec/check_procs -c 1:4 -w 1:4 -a libexec/slapd",
8
+
9
+ "subscribers": ["EBB_CKPRC_SLAPD", "EBB"],
10
+
11
+ "interval": 60
12
+
13
+ },
14
+
15
+ "check_procs_syslog-ng": {
16
+
17
+ "command": "/usr/local/nagios/libexec/check_procs -w 1:4 -c 1:4 -a syslog-ng",
18
+
19
+ "subscribers": ["EBB_CKPRC_SYSLOGNG", "EBB"],
20
+
21
+ "interval": 60
22
+
23
+ },
24
+
25
+ "check_procs_total_procs": {
26
+
27
+ "command": "/usr/local/nagios/libexec/check_procs -w 150 -c 250",
28
+
29
+ "subscribers": ["EBB_CKPRC_TOTAL", "EBB"],
30
+
31
+ "interval": 60
32
+
33
+ }
34
+
35
+ }
36
+
37
+ }
@@ -15,13 +15,23 @@ module Sensu
15
15
  def self.run(options={})
16
16
  api = self.new(options)
17
17
  EM::run do
18
- api.setup_redis
19
- api.setup_transport
20
18
  api.start
21
19
  api.setup_signal_traps
22
20
  end
23
21
  end
24
22
 
23
+ # Setup connections to redis and transport
24
+ #
25
+ # @yield [Object] a callback/block to be called after redis and
26
+ # transport connections have been established.
27
+ def setup_connections
28
+ setup_redis do |redis|
29
+ setup_transport do |transport|
30
+ yield if block_given?
31
+ end
32
+ end
33
+ end
34
+
25
35
  # Start the API HTTP server. This method sets `@http_server`.
26
36
  #
27
37
  # @param bind [String] address to listen on.
@@ -46,7 +56,10 @@ module Sensu
46
56
  api = @settings[:api] || {}
47
57
  bind = api[:bind] || "0.0.0.0"
48
58
  port = api[:port] || 4567
49
- start_http_server(bind, port)
59
+ setup_connections do
60
+ start_http_server(bind, port)
61
+ yield if block_given?
62
+ end
50
63
  super
51
64
  end
52
65
 
@@ -67,11 +80,8 @@ module Sensu
67
80
  # @param options [Hash]
68
81
  def self.test(options={})
69
82
  api = self.new(options)
70
- api.setup_redis do
71
- api.setup_transport do
72
- api.start
73
- yield
74
- end
83
+ api.start do
84
+ yield
75
85
  end
76
86
  end
77
87
  end
@@ -1,7 +1,7 @@
1
1
  module Sensu
2
2
  unless defined?(Sensu::VERSION)
3
3
  # Sensu release version.
4
- VERSION = "0.25.3".freeze
4
+ VERSION = "0.25.4".freeze
5
5
 
6
6
  # Sensu check severities.
7
7
  SEVERITIES = %w[ok warning critical unknown].freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.3
4
+ version: 0.25.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-06-17 00:00:00.000000000 Z
12
+ date: 2016-06-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
@@ -227,6 +227,7 @@ files:
227
227
  - exe/sensu-install
228
228
  - exe/sensu-server
229
229
  - lib/sensu.rb
230
+ - lib/sensu/#test.json#
230
231
  - lib/sensu/api/http_handler.rb
231
232
  - lib/sensu/api/process.rb
232
233
  - lib/sensu/api/routes.rb
@@ -279,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
280
  version: '0'
280
281
  requirements: []
281
282
  rubyforge_project:
282
- rubygems_version: 2.6.3
283
+ rubygems_version: 2.6.4
283
284
  signing_key:
284
285
  specification_version: 4
285
286
  summary: A monitoring framework