sensu 0.9.6.beta.7 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/server.rb +2 -2
- data/lib/sensu/settings.rb +2 -1
- metadata +8 -12
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/server.rb
CHANGED
@@ -158,7 +158,7 @@ module Sensu
|
|
158
158
|
unless check_subdued?(event[:check], :handler)
|
159
159
|
handlers = check_handlers(event[:check])
|
160
160
|
handlers.each do |handler|
|
161
|
-
@logger.
|
161
|
+
@logger.send(event[:check][:type] == 'metric' ? :debug : :info, 'handling event', {
|
162
162
|
:event => event,
|
163
163
|
:handler => handler
|
164
164
|
})
|
@@ -171,7 +171,7 @@ module Sensu
|
|
171
171
|
io.write(event.to_json)
|
172
172
|
io.close_write
|
173
173
|
io.read.split(/\n+/).each do |line|
|
174
|
-
@logger.
|
174
|
+
@logger.info(line)
|
175
175
|
end
|
176
176
|
end
|
177
177
|
rescue Errno::ENOENT => error
|
data/lib/sensu/settings.rb
CHANGED
@@ -5,6 +5,7 @@ module Sensu
|
|
5
5
|
def initialize
|
6
6
|
@logger = Cabin::Channel.get
|
7
7
|
@settings = Hash.new
|
8
|
+
@settings[:checks] = Hash.new
|
8
9
|
@indifferent_access = false
|
9
10
|
@loaded_env = false
|
10
11
|
@loaded_files = Array.new
|
@@ -182,7 +183,7 @@ module Sensu
|
|
182
183
|
|
183
184
|
def validate_checks
|
184
185
|
unless @settings[:checks].is_a?(Hash)
|
185
|
-
invalid('
|
186
|
+
invalid('checks must be a hash')
|
186
187
|
end
|
187
188
|
checks.each do |check|
|
188
189
|
unless check[:interval].is_a?(Integer) && check[:interval] > 0
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 55
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 6
|
10
|
-
|
11
|
-
- 7
|
12
|
-
version: 0.9.6.beta.7
|
10
|
+
version: 0.9.6
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- Sean Porter
|
@@ -18,7 +16,7 @@ autorequire:
|
|
18
16
|
bindir: bin
|
19
17
|
cert_chain: []
|
20
18
|
|
21
|
-
date: 2012-
|
19
|
+
date: 2012-07-09 00:00:00 -07:00
|
22
20
|
default_executable:
|
23
21
|
dependencies:
|
24
22
|
- !ruby/object:Gem::Dependency
|
@@ -225,14 +223,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
225
223
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
224
|
none: false
|
227
225
|
requirements:
|
228
|
-
- - "
|
226
|
+
- - ">="
|
229
227
|
- !ruby/object:Gem::Version
|
230
|
-
hash:
|
228
|
+
hash: 3
|
231
229
|
segments:
|
232
|
-
-
|
233
|
-
|
234
|
-
- 1
|
235
|
-
version: 1.3.1
|
230
|
+
- 0
|
231
|
+
version: "0"
|
236
232
|
requirements: []
|
237
233
|
|
238
234
|
rubyforge_project:
|