sensu 0.17.0.beta.1-java → 0.17.0.beta.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/sensu/client/process.rb +19 -9
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/daemon.rb +7 -3
- data/lib/sensu/redis.rb +1 -1
- data/sensu.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1211c5ad9ff7c8e426994a580d6311818368d958
|
4
|
+
data.tar.gz: 843bd1f44c74f99a0d1e66787f52de53153fd365
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c369defff476341b02f87a029a0db3a4838528a9c969a677492f69311dd5c120e6e0cb8a691f291684b6651b8561971bb4f3c00d52662a33235480bb1f8794d9
|
7
|
+
data.tar.gz: e4e33db49f8496360be5608273af981831d283f07b2fe812d191955c370b094cd2327042e2d6f54d1d466185feb4f6e6903a85bc9ebe29a230fc808148231da6
|
data/CHANGELOG.md
CHANGED
@@ -11,6 +11,19 @@ Handler output with multiple lines is now logged as a single log event.
|
|
11
11
|
|
12
12
|
Support for Sensu filter extensions.
|
13
13
|
|
14
|
+
Check definitions can now specify a Sensu check extension to run,
|
15
|
+
"extension", instead of a command.
|
16
|
+
|
17
|
+
Sensu transport "reconnect_on_error" configuration option, to enable
|
18
|
+
transport reconnect in the event of an unexpected error. This is set to
|
19
|
+
false by default, as some errors are unrecoverable. The Sensu transport
|
20
|
+
will always reconnect when there is a loss of connectivity.
|
21
|
+
|
22
|
+
Sensu Redis "reconnect_on_error" configuration option, to enable Redis
|
23
|
+
reconnect in the event of an unexpected error. This is set to false by
|
24
|
+
default, as some errors are unrecoverable. The Redis client will always
|
25
|
+
reconnect when there is a loss of connectivity.
|
26
|
+
|
14
27
|
### Other
|
15
28
|
|
16
29
|
Fixed TLS/SSL on Windows.
|
data/lib/sensu/client/process.rb
CHANGED
@@ -171,7 +171,10 @@ module Sensu
|
|
171
171
|
# Run a check extension and publish the result. The Sensu client
|
172
172
|
# loads check extensions, checks that run within the Sensu Ruby
|
173
173
|
# VM and the EventMachine event loop, using the Sensu Extension
|
174
|
-
# API.
|
174
|
+
# API. If a check definition includes `:extension`, use it's
|
175
|
+
# value for the extension name, otherwise use the check name.
|
176
|
+
# The check definition is passed to the extension `safe_run()`
|
177
|
+
# method as a parameter, the extension may utilize it.
|
175
178
|
#
|
176
179
|
# https://github.com/sensu/sensu-extension
|
177
180
|
#
|
@@ -179,8 +182,9 @@ module Sensu
|
|
179
182
|
def run_check_extension(check)
|
180
183
|
@logger.debug("attempting to run check extension", :check => check)
|
181
184
|
check[:executed] = Time.now.to_i
|
182
|
-
|
183
|
-
extension
|
185
|
+
extension_name = check[:extension] || check[:name]
|
186
|
+
extension = @extensions[:checks][extension_name]
|
187
|
+
extension.safe_run(check) do |output, status|
|
184
188
|
check[:output] = output
|
185
189
|
check[:status] = status
|
186
190
|
publish_check_result(check)
|
@@ -188,14 +192,19 @@ module Sensu
|
|
188
192
|
end
|
189
193
|
|
190
194
|
# Process a check request. If a check request has a check
|
191
|
-
# command, it will be executed. A check request
|
192
|
-
#
|
193
|
-
#
|
194
|
-
# safe mode is enforced in this method, requiring a local check
|
195
|
+
# command, it will be executed. A standard check request will be
|
196
|
+
# merged with a local check definition, if present. Client safe
|
197
|
+
# mode is enforced in this method, requiring a local check
|
195
198
|
# definition in order to execute the check command. If a local
|
196
199
|
# check definition does not exist when operating with client
|
197
200
|
# safe mode, a check result will be published to report the
|
198
|
-
# missing check definition.
|
201
|
+
# missing check definition. A check request without a
|
202
|
+
# command indicates a check extension run. The check request may
|
203
|
+
# contain `:extension`, the name of the extension to run. If
|
204
|
+
# `:extension` is not present, the check name is used for the
|
205
|
+
# extension name. If a check extension does not exist for a
|
206
|
+
# name, a check result will be published to report the unknown
|
207
|
+
# check extension.
|
199
208
|
#
|
200
209
|
# @param check [Hash]
|
201
210
|
def process_check_request(check)
|
@@ -214,7 +223,8 @@ module Sensu
|
|
214
223
|
execute_check_command(check)
|
215
224
|
end
|
216
225
|
else
|
217
|
-
|
226
|
+
extension_name = check[:extension] || check[:name]
|
227
|
+
if @extensions.check_exists?(extension_name)
|
218
228
|
run_check_extension(check)
|
219
229
|
else
|
220
230
|
@logger.warn("unknown check extension", :check => check)
|
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/daemon.rb
CHANGED
@@ -5,9 +5,9 @@ gem "eventmachine", "1.0.3"
|
|
5
5
|
|
6
6
|
gem "sensu-em", "2.4.1"
|
7
7
|
gem "sensu-logger", "1.0.0"
|
8
|
-
gem "sensu-settings", "1.
|
8
|
+
gem "sensu-settings", "1.3.0"
|
9
9
|
gem "sensu-extension", "1.1.2"
|
10
|
-
gem "sensu-extensions", "1.
|
10
|
+
gem "sensu-extensions", "1.2.0"
|
11
11
|
gem "sensu-transport", "2.4.0"
|
12
12
|
gem "sensu-spawn", "1.1.0"
|
13
13
|
|
@@ -185,7 +185,11 @@ module Sensu
|
|
185
185
|
@transport = Transport.connect(transport_name, transport_settings)
|
186
186
|
@transport.on_error do |error|
|
187
187
|
@logger.fatal("transport connection error", :error => error.to_s)
|
188
|
-
|
188
|
+
if @settings[:transport][:reconnect_on_error]
|
189
|
+
@transport.reconnect
|
190
|
+
else
|
191
|
+
stop
|
192
|
+
end
|
189
193
|
end
|
190
194
|
@transport.before_reconnect do
|
191
195
|
unless testing?
|
data/lib/sensu/redis.rb
CHANGED
data/sensu.gemspec
CHANGED
@@ -19,12 +19,12 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_dependency "eventmachine", "1.0.3"
|
20
20
|
s.add_dependency "sensu-em", "2.4.1"
|
21
21
|
s.add_dependency "sensu-logger", "1.0.0"
|
22
|
-
s.add_dependency "sensu-settings", "1.
|
22
|
+
s.add_dependency "sensu-settings", "1.3.0"
|
23
23
|
s.add_dependency "sensu-extension", "1.1.2"
|
24
|
-
s.add_dependency "sensu-extensions", "1.
|
24
|
+
s.add_dependency "sensu-extensions", "1.2.0"
|
25
25
|
s.add_dependency "sensu-transport", "2.4.0"
|
26
26
|
s.add_dependency "sensu-spawn", "1.1.0"
|
27
|
-
s.add_dependency "em-redis-unified", "0.
|
27
|
+
s.add_dependency "em-redis-unified", "0.6.0"
|
28
28
|
s.add_dependency "sinatra", "1.3.5"
|
29
29
|
s.add_dependency "async_sinatra", "1.0.0"
|
30
30
|
s.add_dependency "thin", "1.5.0" unless RUBY_PLATFORM =~ /java/
|
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.17.0.beta.
|
4
|
+
version: 0.17.0.beta.2
|
5
5
|
platform: java
|
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-03-
|
12
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -87,12 +87,12 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - '='
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 1.
|
90
|
+
version: 1.3.0
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 1.
|
95
|
+
version: 1.3.0
|
96
96
|
prerelease: false
|
97
97
|
type: :runtime
|
98
98
|
- !ruby/object:Gem::Dependency
|
@@ -115,12 +115,12 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - '='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 1.
|
118
|
+
version: 1.2.0
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 1.
|
123
|
+
version: 1.2.0
|
124
124
|
prerelease: false
|
125
125
|
type: :runtime
|
126
126
|
- !ruby/object:Gem::Dependency
|
@@ -157,12 +157,12 @@ dependencies:
|
|
157
157
|
requirements:
|
158
158
|
- - '='
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0.
|
160
|
+
version: 0.6.0
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - '='
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0.
|
165
|
+
version: 0.6.0
|
166
166
|
prerelease: false
|
167
167
|
type: :runtime
|
168
168
|
- !ruby/object:Gem::Dependency
|