sensu 0.13.0.beta → 0.13.0.beta.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 +2 -1
- data/lib/sensu/client.rb +11 -8
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/daemon.rb +1 -1
- data/sensu.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c4221b329539aeeca46fd4e8cd4defebc6ca41
|
4
|
+
data.tar.gz: 1d97b6669db13f4e5db48a72fb9628777ab4b05c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b84ad62f1f09def1515e543787bfbcd19ac1fd994344c7a9c3f9092d5de56041c76b10fc24692f53f2942e918255a3afcf28f03f2eacc74709280116dcc76841
|
7
|
+
data.tar.gz: 174bc2ea21a3711708d20ce0525978b3dce08d95566f585311c46b6d3694b804e6daafe41f616ae742cd146b3d364cf9279f2ba8030f6b77c7c9fa2f2567c01f
|
data/CHANGELOG.md
CHANGED
@@ -32,7 +32,8 @@ everything but check extensions.
|
|
32
32
|
|
33
33
|
Fixed standalone check scheduling, no longer mutating definitions.
|
34
34
|
|
35
|
-
Fixed command token substitution, allowing for the use of colons
|
35
|
+
Fixed command token substitution, allowing for the use of colons and
|
36
|
+
working value defaults.
|
36
37
|
|
37
38
|
Log events are flushed when the eventmachine reactor stops.
|
38
39
|
|
data/lib/sensu/client.rb
CHANGED
@@ -68,17 +68,20 @@ module Sensu
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
def find_client_attribute(tree, path, default)
|
72
|
+
attribute = tree[path.shift]
|
73
|
+
if attribute.is_a?(Hash)
|
74
|
+
find_client_attribute(attribute, path, default)
|
75
|
+
else
|
76
|
+
attribute.nil? ? default : attribute
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
71
80
|
def substitute_command_tokens(check)
|
72
81
|
unmatched_tokens = Array.new
|
73
|
-
substituted = check[:command].gsub(/:::([^:]
|
82
|
+
substituted = check[:command].gsub(/:::([^:].*?):::/) do
|
74
83
|
token, default = $1.to_s.split('|', -1)
|
75
|
-
matched = token.split('.')
|
76
|
-
if client[attribute].nil?
|
77
|
-
default.nil? ? break : default
|
78
|
-
else
|
79
|
-
client[attribute]
|
80
|
-
end
|
81
|
-
end
|
84
|
+
matched = find_client_attribute(@settings[:client], token.split('.'), default)
|
82
85
|
if matched.nil?
|
83
86
|
unmatched_tokens << token
|
84
87
|
end
|
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/daemon.rb
CHANGED
data/sensu.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.add_dependency('json') if RUBY_VERSION < "1.9"
|
17
17
|
s.add_dependency('multi_json', '1.10.1')
|
18
18
|
s.add_dependency('uuidtools', '2.1.4')
|
19
|
-
s.add_dependency('sensu-em', '2.
|
19
|
+
s.add_dependency('sensu-em', '2.1.0')
|
20
20
|
s.add_dependency('sensu-logger', '0.0.1')
|
21
21
|
s.add_dependency('sensu-settings', '0.0.7')
|
22
22
|
s.add_dependency('sensu-extension', '0.0.3')
|
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.13.0.beta
|
4
|
+
version: 0.13.0.beta.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: 2014-05-
|
12
|
+
date: 2014-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - '='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 2.
|
48
|
+
version: 2.1.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - '='
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 2.
|
55
|
+
version: 2.1.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: sensu-logger
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|