sensu 0.19.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/sensu/api/process.rb +1 -1
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/daemon.rb +1 -1
- data/lib/sensu/server/handle.rb +1 -2
- data/lib/sensu/server/socket.rb +23 -11
- data/lib/sensu/utilities.rb +1 -1
- data/sensu.gemspec +3 -3
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dc75243d46b5c3d1a4e7637c39fe599af1a0268
|
4
|
+
data.tar.gz: bed404c945a267f021355d040bcfec5f87e3fbab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1dec9e79a91f97c7e02ee9b942c608b79ff293cca5a7e6191794dda8a29c1786f9e4d254410785056a3b271e581155f8b3926d649002a87c8b6790c41a9674a
|
7
|
+
data.tar.gz: 29c9a642beeeb53070890f088aaabb931795b24b6b034f7b015a4d3ea16e303e4433dc9fc363cde273dac2ad137ba7f1b5c84ea34ce7c324755d2a506762eee9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 0.19.1 - 2015-06-04
|
2
|
+
|
3
|
+
### Other
|
4
|
+
|
5
|
+
Now using an EventMachine timer for the TCP handler connection timeout, as
|
6
|
+
`pending_connect_timeout()` and `comm_inactivity_timeout()` are not
|
7
|
+
currently supported on all platforms.
|
8
|
+
|
9
|
+
Updated Thin and UUID tools to the latest versions, which include
|
10
|
+
improvements and bug fixes.
|
11
|
+
|
1
12
|
## 0.19.0 - 2015-06-01
|
2
13
|
|
3
14
|
### Features
|
data/lib/sensu/api/process.rb
CHANGED
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/daemon.rb
CHANGED
data/lib/sensu/server/handle.rb
CHANGED
@@ -61,8 +61,7 @@ module Sensu
|
|
61
61
|
end
|
62
62
|
socket.on_error = on_error
|
63
63
|
timeout = handler[:timeout] || 10
|
64
|
-
socket.
|
65
|
-
socket.comm_inactivity_timeout = timeout
|
64
|
+
socket.set_timeout(timeout)
|
66
65
|
socket.send_data(event_data.to_s)
|
67
66
|
socket.close_connection_after_writing
|
68
67
|
end
|
data/lib/sensu/server/socket.rb
CHANGED
@@ -10,26 +10,38 @@ module Sensu
|
|
10
10
|
# @return [Proc] callback to be called when there is an error.
|
11
11
|
attr_accessor :on_error
|
12
12
|
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
13
|
+
# Create a timeout timer to immediately close the socket
|
14
|
+
# connection and set `@timed_out` to true to indicate that the
|
15
|
+
# timeout caused the connection to close. The timeout timer is
|
16
|
+
# stored with `@timeout_timer`, so that it can be cancelled when
|
17
|
+
# the connection is closed.
|
18
|
+
#
|
19
|
+
# @param timeout [Numeric] in seconds.
|
20
|
+
def set_timeout(timeout)
|
21
|
+
@timeout_timer = EM::Timer.new(timeout) do
|
22
|
+
@timed_out = true
|
23
|
+
close_connection
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Record the current time when connected.
|
16
28
|
def connection_completed
|
17
29
|
@connected_at = Time.now.to_f
|
18
|
-
@inactivity_timeout = comm_inactivity_timeout
|
19
30
|
end
|
20
31
|
|
21
32
|
# Determine if the connection and data transmission was
|
22
33
|
# successful and call the appropriate callback, `@on_success`
|
23
|
-
# or `@on_error`, providing it with a message.
|
34
|
+
# or `@on_error`, providing it with a message. Cancel the
|
35
|
+
# connection timeout timer `@timeout_timer`, if it is set. The
|
24
36
|
# `@connected_at` timestamp indicates that the connection was
|
25
|
-
# successful. If
|
26
|
-
# timeout
|
27
|
-
#
|
37
|
+
# successful. If `@timed_out` is true, the connection was closed
|
38
|
+
# by the connection timeout, and the data is assumed to not have
|
39
|
+
# been transmitted.
|
28
40
|
def unbind
|
41
|
+
@timeout_timer.cancel if @timeout_timer
|
29
42
|
if @connected_at
|
30
|
-
|
31
|
-
|
32
|
-
@on_error.call("socket inactivity timeout")
|
43
|
+
if @timed_out
|
44
|
+
@on_error.call("socket timeout")
|
33
45
|
else
|
34
46
|
@on_success.call("wrote to socket")
|
35
47
|
end
|
data/lib/sensu/utilities.rb
CHANGED
data/sensu.gemspec
CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_dependency "json" if RUBY_VERSION < "1.9"
|
17
17
|
s.add_dependency "multi_json", "1.11.0"
|
18
|
-
s.add_dependency "uuidtools", "2.1.
|
18
|
+
s.add_dependency "uuidtools", "2.1.5"
|
19
19
|
s.add_dependency "eventmachine", "1.0.3"
|
20
|
-
s.add_dependency "sensu-em", "2.5.
|
20
|
+
s.add_dependency "sensu-em", "2.5.1"
|
21
21
|
s.add_dependency "sensu-logger", "1.0.0"
|
22
22
|
s.add_dependency "sensu-settings", "1.9.0"
|
23
23
|
s.add_dependency "sensu-extension", "1.1.2"
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_dependency "em-redis-unified", "1.0.0"
|
28
28
|
s.add_dependency "sinatra", "1.4.6"
|
29
29
|
s.add_dependency "async_sinatra", "1.2.0"
|
30
|
-
s.add_dependency "thin", "1.
|
30
|
+
s.add_dependency "thin", "1.6.3" unless RUBY_PLATFORM =~ /java/
|
31
31
|
|
32
32
|
s.add_development_dependency "rake", "~> 10.3"
|
33
33
|
s.add_development_dependency "rspec", "~> 3.0.0"
|
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.19.
|
4
|
+
version: 0.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-06-
|
12
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 2.1.
|
34
|
+
version: 2.1.5
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 2.1.
|
41
|
+
version: 2.1.5
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: eventmachine
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - '='
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.5.
|
62
|
+
version: 2.5.1
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 2.5.
|
69
|
+
version: 2.5.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: sensu-logger
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,14 +199,14 @@ dependencies:
|
|
199
199
|
requirements:
|
200
200
|
- - '='
|
201
201
|
- !ruby/object:Gem::Version
|
202
|
-
version: 1.
|
202
|
+
version: 1.6.3
|
203
203
|
type: :runtime
|
204
204
|
prerelease: false
|
205
205
|
version_requirements: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
207
|
- - '='
|
208
208
|
- !ruby/object:Gem::Version
|
209
|
-
version: 1.
|
209
|
+
version: 1.6.3
|
210
210
|
- !ruby/object:Gem::Dependency
|
211
211
|
name: rake
|
212
212
|
requirement: !ruby/object:Gem::Requirement
|
@@ -307,3 +307,4 @@ signing_key:
|
|
307
307
|
specification_version: 4
|
308
308
|
summary: A monitoring framework
|
309
309
|
test_files: []
|
310
|
+
has_rdoc: false
|