sensu 0.14.0-java → 0.15.0.beta.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/sensu/client.rb +35 -14
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/daemon.rb +1 -1
- data/lib/sensu/server.rb +7 -11
- data/sensu.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1055408b4fb4a2fd220e4bf8c1566d9b169e4be
|
4
|
+
data.tar.gz: fae5db2afdf20354911471d3bcf37bb78cc259ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 290a55ba701322935d0457486c18d168cd7db68beea2feb99f7ec7db287573965861659c8eacbeb8ede86b59c7ee9d5511949acad5d46232839eb82ba06a4f4c
|
7
|
+
data.tar.gz: 91c1b5eeac505146d535f238ed87285a2d3cb183db1985146c6f6a3c59d6fb3298303b11a2fc02057ddaded58f9e67bf78a1a507d7fefec5d26c8e558cd674e6
|
data/CHANGELOG.md
CHANGED
data/lib/sensu/client.rb
CHANGED
@@ -44,9 +44,7 @@ module Sensu
|
|
44
44
|
@logger.debug('scheduling keepalives')
|
45
45
|
publish_keepalive
|
46
46
|
@timers[:run] << EM::PeriodicTimer.new(20) do
|
47
|
-
|
48
|
-
publish_keepalive
|
49
|
-
end
|
47
|
+
publish_keepalive
|
50
48
|
end
|
51
49
|
end
|
52
50
|
|
@@ -195,10 +193,8 @@ module Sensu
|
|
195
193
|
@timers[:run] << EM::Timer.new(scheduling_delay) do
|
196
194
|
interval = testing? ? 0.5 : check[:interval]
|
197
195
|
@timers[:run] << EM::PeriodicTimer.new(interval) do
|
198
|
-
|
199
|
-
|
200
|
-
process_check(check.dup)
|
201
|
-
end
|
196
|
+
check[:issued] = Time.now.to_i
|
197
|
+
process_check(check.dup)
|
202
198
|
end
|
203
199
|
end
|
204
200
|
end
|
@@ -247,21 +243,46 @@ module Sensu
|
|
247
243
|
end
|
248
244
|
end
|
249
245
|
|
250
|
-
def
|
251
|
-
setup_transport
|
246
|
+
def bootstrap
|
252
247
|
setup_keepalives
|
253
248
|
setup_subscriptions
|
254
249
|
setup_standalone
|
250
|
+
@state = :running
|
251
|
+
end
|
252
|
+
|
253
|
+
def start
|
254
|
+
setup_transport
|
255
255
|
setup_sockets
|
256
|
-
|
256
|
+
bootstrap
|
257
|
+
end
|
258
|
+
|
259
|
+
def pause
|
260
|
+
unless @state == :pausing || @state == :paused
|
261
|
+
@state = :pausing
|
262
|
+
@timers[:run].each do |timer|
|
263
|
+
timer.cancel
|
264
|
+
end
|
265
|
+
@timers[:run].clear
|
266
|
+
@transport.unsubscribe
|
267
|
+
@state = :paused
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
def resume
|
272
|
+
retry_until_true(1) do
|
273
|
+
if @state == :paused
|
274
|
+
if @transport.connected?
|
275
|
+
bootstrap
|
276
|
+
true
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|
257
280
|
end
|
258
281
|
|
259
282
|
def stop
|
260
283
|
@logger.warn('stopping')
|
261
|
-
|
262
|
-
|
263
|
-
end
|
264
|
-
@transport.unsubscribe
|
284
|
+
pause
|
285
|
+
@state = :stopping
|
265
286
|
complete_checks_in_progress do
|
266
287
|
@transport.close
|
267
288
|
super
|
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/daemon.rb
CHANGED
data/lib/sensu/server.rb
CHANGED
@@ -727,7 +727,7 @@ module Sensu
|
|
727
727
|
bootstrap
|
728
728
|
end
|
729
729
|
|
730
|
-
def pause
|
730
|
+
def pause
|
731
731
|
unless @state == :pausing || @state == :paused
|
732
732
|
@state = :pausing
|
733
733
|
@timers[:run].each do |timer|
|
@@ -737,9 +737,6 @@ module Sensu
|
|
737
737
|
unsubscribe
|
738
738
|
resign_as_master
|
739
739
|
@state = :paused
|
740
|
-
if block
|
741
|
-
block.call
|
742
|
-
end
|
743
740
|
end
|
744
741
|
end
|
745
742
|
|
@@ -756,13 +753,12 @@ module Sensu
|
|
756
753
|
|
757
754
|
def stop
|
758
755
|
@logger.warn('stopping')
|
759
|
-
pause
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
end
|
756
|
+
pause
|
757
|
+
@state = :stopping
|
758
|
+
complete_handlers_in_progress do
|
759
|
+
@redis.close
|
760
|
+
@transport.close
|
761
|
+
super
|
766
762
|
end
|
767
763
|
end
|
768
764
|
end
|
data/sensu.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency('sensu-settings', '1.2.0')
|
22
22
|
s.add_dependency('sensu-extension', '1.0.0')
|
23
23
|
s.add_dependency('sensu-extensions', '1.0.0')
|
24
|
-
s.add_dependency('sensu-transport', '
|
24
|
+
s.add_dependency('sensu-transport', '2.0.0')
|
25
25
|
s.add_dependency('sensu-spawn', '1.1.0')
|
26
26
|
s.add_dependency('em-redis-unified', '0.5.0')
|
27
27
|
s.add_dependency('sinatra', '1.3.5')
|
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.
|
4
|
+
version: 0.15.0.beta.1
|
5
5
|
platform: java
|
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-
|
12
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -115,12 +115,12 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - '='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: 2.0.0
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: 2.0.0
|
124
124
|
prerelease: false
|
125
125
|
type: :runtime
|
126
126
|
- !ruby/object:Gem::Dependency
|
@@ -265,9 +265,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
265
265
|
version: '0'
|
266
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
267
|
requirements:
|
268
|
-
- - '
|
268
|
+
- - '>'
|
269
269
|
- !ruby/object:Gem::Version
|
270
|
-
version:
|
270
|
+
version: 1.3.1
|
271
271
|
requirements: []
|
272
272
|
rubyforge_project:
|
273
273
|
rubygems_version: 2.1.9
|