sensu 0.26.3 → 0.26.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/sensu/client/process.rb +18 -8
- data/lib/sensu/constants.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40d2e4826f92172cff091ca9f9748abb7e0da9ad
|
4
|
+
data.tar.gz: 41c30523f286c24fcf287f220da4daf087bcf421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c76a81ac584733b7c9b5d4222e219524164c1ee48f717aa2812bc04a5ff3ad54c5d44249e6c9eaa9326ca0020833f55f223f8a504f877e6b44157230d58ee01f
|
7
|
+
data.tar.gz: 217707586fc86d2d3a52f46a5c73bba3f0190f31564f9fb65d6ff364dffab8f22c0ea879b7381c5ac19ecad4b9ac14b136d4bd18aeceaa57fd5ee40c6c39348c
|
data/CHANGELOG.md
CHANGED
data/lib/sensu/client/process.rb
CHANGED
@@ -173,20 +173,30 @@ module Sensu
|
|
173
173
|
# API. If a check definition includes `:extension`, use it's
|
174
174
|
# value for the extension name, otherwise use the check name.
|
175
175
|
# The check definition is passed to the extension `safe_run()`
|
176
|
-
# method as a parameter, the extension may utilize it.
|
176
|
+
# method as a parameter, the extension may utilize it. This
|
177
|
+
# method guards against multiple executions for the same check
|
178
|
+
# extension.
|
177
179
|
#
|
178
180
|
# https://github.com/sensu/sensu-extension
|
179
181
|
#
|
180
182
|
# @param check [Hash]
|
181
183
|
def run_check_extension(check)
|
182
184
|
@logger.debug("attempting to run check extension", :check => check)
|
183
|
-
check[:
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
check[:
|
188
|
-
|
189
|
-
|
185
|
+
unless @checks_in_progress.include?(check[:name])
|
186
|
+
@checks_in_progress << check[:name]
|
187
|
+
started = Time.now.to_f
|
188
|
+
check[:executed] = started.to_i
|
189
|
+
extension_name = check[:extension] || check[:name]
|
190
|
+
extension = @extensions[:checks][extension_name]
|
191
|
+
extension.safe_run(check) do |output, status|
|
192
|
+
check[:duration] = ("%.3f" % (Time.now.to_f - started)).to_f
|
193
|
+
check[:output] = output
|
194
|
+
check[:status] = status
|
195
|
+
publish_check_result(check)
|
196
|
+
@checks_in_progress.delete(check[:name])
|
197
|
+
end
|
198
|
+
else
|
199
|
+
@logger.warn("previous check extension execution in progress", :check => check)
|
190
200
|
end
|
191
201
|
end
|
192
202
|
|
data/lib/sensu/constants.rb
CHANGED
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.26.
|
4
|
+
version: 0.26.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-
|
12
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
280
|
version: '0'
|
281
281
|
requirements: []
|
282
282
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.6.
|
283
|
+
rubygems_version: 2.6.3
|
284
284
|
signing_key:
|
285
285
|
specification_version: 4
|
286
286
|
summary: A monitoring framework
|