sensu 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +8 -0
- data/lib/sensu/api/routes/results.rb +2 -1
- data/lib/sensu/client/process.rb +1 -0
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/server/filter.rb +5 -1
- data/lib/sensu/server/process.rb +1 -1
- data/lib/sensu/utilities.rb +25 -0
- data/sensu.gemspec +0 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77726a20c8e3a4cb2f549caa4f33c3c6bfcf4efb
|
4
|
+
data.tar.gz: c7fe0e9214ccb27c3b14bfa6aa7f89f7f5d07f1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef6330e24403cf0aa3d9b7e5ad9b918197ad3634583c053ffed676948f26737bf4aeda29e902318fa1c37864ca27b11250477900098bc6cf0f2467b6c95ab8e1
|
7
|
+
data.tar.gz: da78852eed102c0c250118384e976fad1c0fa64bf729b8c61459550a10a9400633f2ac093a264c56e69f9b31024e28e2260baeba6439ceceaa5ae481ab29a1e8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [1.4.3] - 2018-07-23
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Prevent check results from being published with an empty source attribute.
|
12
|
+
- Use handler extension definitions when logging rather than handler extension objects.
|
13
|
+
- Added validation for ttl attribute in results API.
|
14
|
+
- Fixed case where proxy checks with token substitution can retain previous values.
|
15
|
+
|
8
16
|
## [1.4.2] - 2018-05-10
|
9
17
|
|
10
18
|
### Fixed
|
@@ -16,7 +16,8 @@ module Sensu
|
|
16
16
|
:name => {:type => String, :nil_ok => false, :regex => /\A[\w\.-]+\z/},
|
17
17
|
:output => {:type => String, :nil_ok => false},
|
18
18
|
:status => {:type => Integer, :nil_ok => true},
|
19
|
-
:source => {:type => String, :nil_ok => true, :regex => /\A[\w\.-]+\z/}
|
19
|
+
:source => {:type => String, :nil_ok => true, :regex => /\A[\w\.-]+\z/},
|
20
|
+
:ttl => {:type => Integer, :nil_ok => true}
|
20
21
|
}
|
21
22
|
read_data(rules) do |data|
|
22
23
|
publish_check_result("sensu-api", data)
|
data/lib/sensu/client/process.rb
CHANGED
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/server/filter.rb
CHANGED
@@ -192,7 +192,11 @@ module Sensu
|
|
192
192
|
# filtered.
|
193
193
|
# @yieldparam event [Hash]
|
194
194
|
def filter_event(handler, event)
|
195
|
-
|
195
|
+
handler_info = case handler[:type]
|
196
|
+
when "extension" then handler.definition
|
197
|
+
else handler
|
198
|
+
end
|
199
|
+
details = {:handler => handler_info, :event => event}
|
196
200
|
filter_message = case
|
197
201
|
when handling_disabled?(event)
|
198
202
|
"event handling disabled for event"
|
data/lib/sensu/server/process.rb
CHANGED
@@ -836,7 +836,7 @@ module Sensu
|
|
836
836
|
:client => client,
|
837
837
|
:check => check
|
838
838
|
})
|
839
|
-
proxy_check, unmatched_tokens = object_substitute_tokens(check.dup, client)
|
839
|
+
proxy_check, unmatched_tokens = object_substitute_tokens(deep_dup(check.dup), client)
|
840
840
|
if unmatched_tokens.empty?
|
841
841
|
proxy_check[:source] ||= client[:name]
|
842
842
|
publish_check_request(proxy_check)
|
data/lib/sensu/utilities.rb
CHANGED
@@ -51,6 +51,31 @@ module Sensu
|
|
51
51
|
merged
|
52
52
|
end
|
53
53
|
|
54
|
+
# Creates a deep dup of basic ruby objects with support for walking
|
55
|
+
# hashes and arrays.
|
56
|
+
#
|
57
|
+
# @param obj [Object]
|
58
|
+
# @return [obj] a dup of the original object.
|
59
|
+
def deep_dup(obj)
|
60
|
+
if obj.class == Hash
|
61
|
+
new_obj = obj.dup
|
62
|
+
new_obj.each do |key, value|
|
63
|
+
new_obj[deep_dup(key)] = deep_dup(value)
|
64
|
+
end
|
65
|
+
new_obj
|
66
|
+
elsif obj.class == Array
|
67
|
+
arr = []
|
68
|
+
obj.each do |item|
|
69
|
+
arr << deep_dup(item)
|
70
|
+
end
|
71
|
+
arr
|
72
|
+
elsif obj.class == String
|
73
|
+
obj.dup
|
74
|
+
else
|
75
|
+
obj
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
54
79
|
# Retrieve the system hostname. If the hostname cannot be
|
55
80
|
# determined and an error is thrown, `nil` will be returned.
|
56
81
|
#
|
data/sensu.gemspec
CHANGED
@@ -10,7 +10,6 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.summary = "A monitoring framework"
|
11
11
|
s.description = "A monitoring framework that aims to be simple, malleable, and scalable."
|
12
12
|
s.license = "MIT"
|
13
|
-
s.has_rdoc = false
|
14
13
|
|
15
14
|
s.add_dependency "eventmachine", "1.2.5"
|
16
15
|
s.add_dependency "sensu-json", "2.1.1"
|
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: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
jOeGyhtQa9j4FFmsEJDg59f5v/3hECXsa3Xuml3foaFHzX3Ya/YIyd2YFxvkFKIu
|
32
32
|
GVbe7A3YdxzdkH2Es/Ym9twdxXaIDdXzj8sWhw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2018-
|
34
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: eventmachine
|
metadata.gz.sig
CHANGED
Binary file
|