sensu 0.7.1 → 0.7.2
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.
- data/lib/sensu/server.rb +11 -9
- data/lib/sensu.rb +1 -1
- metadata +4 -4
data/lib/sensu/server.rb
CHANGED
@@ -171,15 +171,17 @@ module Sensu
|
|
171
171
|
exchanges = Hash.new
|
172
172
|
stagger = options[:test] ? 0 : 7
|
173
173
|
@settings.checks.each_with_index do |(name, details), index|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
exchanges[exchange]
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
174
|
+
unless details.enabled == false
|
175
|
+
EM.add_timer(stagger*index) do
|
176
|
+
details.subscribers.each do |exchange|
|
177
|
+
if exchanges[exchange].nil?
|
178
|
+
exchanges[exchange] = @amq.fanout(exchange)
|
179
|
+
end
|
180
|
+
interval = options[:test] ? 0.5 : details.interval
|
181
|
+
EM.add_periodic_timer(interval) do
|
182
|
+
exchanges[exchange].publish({'name' => name, 'issued' => Time.now.to_i}.to_json)
|
183
|
+
EM.debug('name="Published Check" event_id=server action="Published check ' + name + ' to the ' + exchange + ' exchange"')
|
184
|
+
end
|
183
185
|
end
|
184
186
|
end
|
185
187
|
end
|
data/lib/sensu.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 2
|
10
|
+
version: 0.7.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sean Porter
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-10-
|
19
|
+
date: 2011-10-14 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|