sensu 0.8.9 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -4
- data/Gemfile.lock +10 -6
- data/lib/sensu.rb +1 -1
- data/lib/sensu/api.rb +1 -0
- data/lib/sensu/client.rb +4 -2
- data/lib/sensu/config.rb +5 -1
- data/lib/sensu/server.rb +7 -4
- data/sensu.gemspec +1 -0
- metadata +44 -30
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sensu (0.8.
|
4
|
+
sensu (0.8.10)
|
5
5
|
amqp (= 0.7.4)
|
6
6
|
async_sinatra
|
7
|
+
bundler
|
7
8
|
cabin (= 0.1.7)
|
8
9
|
eventmachine (~> 1.0.0.beta.4)
|
9
10
|
hashie
|
@@ -27,18 +28,21 @@ GEM
|
|
27
28
|
json
|
28
29
|
daemons (1.1.4)
|
29
30
|
diff-lcs (1.1.3)
|
30
|
-
em-http-request (0.
|
31
|
-
addressable (>= 2.
|
32
|
-
|
33
|
-
eventmachine (>= 0.
|
31
|
+
em-http-request (1.0.0)
|
32
|
+
addressable (>= 2.2.3)
|
33
|
+
em-socksify
|
34
|
+
eventmachine (>= 1.0.0.beta.3)
|
35
|
+
http_parser.rb (>= 0.5.2)
|
36
|
+
em-socksify (0.1.0)
|
37
|
+
eventmachine
|
34
38
|
em-spec (0.2.5)
|
35
39
|
bacon
|
36
40
|
eventmachine
|
37
41
|
rspec (~> 2.6.0)
|
38
42
|
test-unit
|
39
|
-
escape_utils (0.2.4)
|
40
43
|
eventmachine (1.0.0.beta.4)
|
41
44
|
hashie (1.2.0)
|
45
|
+
http_parser.rb (0.5.3)
|
42
46
|
json (1.6.1)
|
43
47
|
rack (1.3.5)
|
44
48
|
rack-protection (1.1.4)
|
data/lib/sensu.rb
CHANGED
data/lib/sensu/api.rb
CHANGED
data/lib/sensu/client.rb
CHANGED
@@ -77,8 +77,10 @@ module Sensu
|
|
77
77
|
end
|
78
78
|
if unmatched_tokens.empty?
|
79
79
|
execute = proc do
|
80
|
-
|
81
|
-
|
80
|
+
Bundler.with_clean_env do
|
81
|
+
IO.popen(command + ' 2>&1') do |io|
|
82
|
+
check.output = io.read
|
83
|
+
end
|
82
84
|
end
|
83
85
|
check.status = $?.exitstatus
|
84
86
|
end
|
data/lib/sensu/config.rb
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
require 'rubygems' if RUBY_VERSION < '1.9.0'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
require File.join(File.dirname(__FILE__), 'helpers')
|
5
|
+
|
2
6
|
gem 'eventmachine', '~> 1.0.0.beta.4'
|
7
|
+
|
3
8
|
require 'optparse'
|
4
9
|
require 'json'
|
5
10
|
require 'hashie'
|
@@ -7,7 +12,6 @@ require 'uuidtools'
|
|
7
12
|
require 'amqp'
|
8
13
|
require 'cabin'
|
9
14
|
require 'cabin/outputs/em-stdlib-logger'
|
10
|
-
require File.join(File.dirname(__FILE__), 'helpers')
|
11
15
|
|
12
16
|
module Sensu
|
13
17
|
class Config
|
data/lib/sensu/server.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'config')
|
2
|
+
|
2
3
|
require 'redis'
|
3
4
|
|
4
5
|
module Sensu
|
@@ -67,10 +68,12 @@ module Sensu
|
|
67
68
|
def handle_event(event)
|
68
69
|
handler = proc do
|
69
70
|
output = ''
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
Bundler.with_clean_env do
|
72
|
+
IO.popen(@settings.handlers[event.check.handler] + ' 2>&1', 'r+') do |io|
|
73
|
+
io.write(event.to_json)
|
74
|
+
io.close_write
|
75
|
+
output = io.read
|
76
|
+
end
|
74
77
|
end
|
75
78
|
output
|
76
79
|
end
|
data/sensu.gemspec
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: 43
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 10
|
10
|
+
version: 0.8.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sean Porter
|
@@ -16,13 +16,27 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-11-
|
19
|
+
date: 2011-11-18 00:00:00 -08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
|
-
name:
|
23
|
+
name: bundler
|
24
24
|
prerelease: false
|
25
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: eventmachine
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
26
40
|
none: false
|
27
41
|
requirements:
|
28
42
|
- - ~>
|
@@ -36,11 +50,11 @@ dependencies:
|
|
36
50
|
- 4
|
37
51
|
version: 1.0.0.beta.4
|
38
52
|
type: :runtime
|
39
|
-
version_requirements: *
|
53
|
+
version_requirements: *id002
|
40
54
|
- !ruby/object:Gem::Dependency
|
41
55
|
name: amqp
|
42
56
|
prerelease: false
|
43
|
-
requirement: &
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
44
58
|
none: false
|
45
59
|
requirements:
|
46
60
|
- - "="
|
@@ -52,11 +66,11 @@ dependencies:
|
|
52
66
|
- 4
|
53
67
|
version: 0.7.4
|
54
68
|
type: :runtime
|
55
|
-
version_requirements: *
|
69
|
+
version_requirements: *id003
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
71
|
name: json
|
58
72
|
prerelease: false
|
59
|
-
requirement: &
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
60
74
|
none: false
|
61
75
|
requirements:
|
62
76
|
- - ">="
|
@@ -66,11 +80,11 @@ dependencies:
|
|
66
80
|
- 0
|
67
81
|
version: "0"
|
68
82
|
type: :runtime
|
69
|
-
version_requirements: *
|
83
|
+
version_requirements: *id004
|
70
84
|
- !ruby/object:Gem::Dependency
|
71
85
|
name: hashie
|
72
86
|
prerelease: false
|
73
|
-
requirement: &
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
74
88
|
none: false
|
75
89
|
requirements:
|
76
90
|
- - ">="
|
@@ -80,11 +94,11 @@ dependencies:
|
|
80
94
|
- 0
|
81
95
|
version: "0"
|
82
96
|
type: :runtime
|
83
|
-
version_requirements: *
|
97
|
+
version_requirements: *id005
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: uuidtools
|
86
100
|
prerelease: false
|
87
|
-
requirement: &
|
101
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
88
102
|
none: false
|
89
103
|
requirements:
|
90
104
|
- - ">="
|
@@ -94,11 +108,11 @@ dependencies:
|
|
94
108
|
- 0
|
95
109
|
version: "0"
|
96
110
|
type: :runtime
|
97
|
-
version_requirements: *
|
111
|
+
version_requirements: *id006
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: cabin
|
100
114
|
prerelease: false
|
101
|
-
requirement: &
|
115
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
102
116
|
none: false
|
103
117
|
requirements:
|
104
118
|
- - "="
|
@@ -110,11 +124,11 @@ dependencies:
|
|
110
124
|
- 7
|
111
125
|
version: 0.1.7
|
112
126
|
type: :runtime
|
113
|
-
version_requirements: *
|
127
|
+
version_requirements: *id007
|
114
128
|
- !ruby/object:Gem::Dependency
|
115
129
|
name: ruby-redis
|
116
130
|
prerelease: false
|
117
|
-
requirement: &
|
131
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
118
132
|
none: false
|
119
133
|
requirements:
|
120
134
|
- - ">="
|
@@ -124,11 +138,11 @@ dependencies:
|
|
124
138
|
- 0
|
125
139
|
version: "0"
|
126
140
|
type: :runtime
|
127
|
-
version_requirements: *
|
141
|
+
version_requirements: *id008
|
128
142
|
- !ruby/object:Gem::Dependency
|
129
143
|
name: rack
|
130
144
|
prerelease: false
|
131
|
-
requirement: &
|
145
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
132
146
|
none: false
|
133
147
|
requirements:
|
134
148
|
- - ~>
|
@@ -140,11 +154,11 @@ dependencies:
|
|
140
154
|
- 4
|
141
155
|
version: 1.3.4
|
142
156
|
type: :runtime
|
143
|
-
version_requirements: *
|
157
|
+
version_requirements: *id009
|
144
158
|
- !ruby/object:Gem::Dependency
|
145
159
|
name: async_sinatra
|
146
160
|
prerelease: false
|
147
|
-
requirement: &
|
161
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
148
162
|
none: false
|
149
163
|
requirements:
|
150
164
|
- - ">="
|
@@ -154,11 +168,11 @@ dependencies:
|
|
154
168
|
- 0
|
155
169
|
version: "0"
|
156
170
|
type: :runtime
|
157
|
-
version_requirements: *
|
171
|
+
version_requirements: *id010
|
158
172
|
- !ruby/object:Gem::Dependency
|
159
173
|
name: thin
|
160
174
|
prerelease: false
|
161
|
-
requirement: &
|
175
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
162
176
|
none: false
|
163
177
|
requirements:
|
164
178
|
- - ">="
|
@@ -168,11 +182,11 @@ dependencies:
|
|
168
182
|
- 0
|
169
183
|
version: "0"
|
170
184
|
type: :runtime
|
171
|
-
version_requirements: *
|
185
|
+
version_requirements: *id011
|
172
186
|
- !ruby/object:Gem::Dependency
|
173
187
|
name: rake
|
174
188
|
prerelease: false
|
175
|
-
requirement: &
|
189
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
176
190
|
none: false
|
177
191
|
requirements:
|
178
192
|
- - ">="
|
@@ -182,11 +196,11 @@ dependencies:
|
|
182
196
|
- 0
|
183
197
|
version: "0"
|
184
198
|
type: :development
|
185
|
-
version_requirements: *
|
199
|
+
version_requirements: *id012
|
186
200
|
- !ruby/object:Gem::Dependency
|
187
201
|
name: em-spec
|
188
202
|
prerelease: false
|
189
|
-
requirement: &
|
203
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
190
204
|
none: false
|
191
205
|
requirements:
|
192
206
|
- - ">="
|
@@ -196,11 +210,11 @@ dependencies:
|
|
196
210
|
- 0
|
197
211
|
version: "0"
|
198
212
|
type: :development
|
199
|
-
version_requirements: *
|
213
|
+
version_requirements: *id013
|
200
214
|
- !ruby/object:Gem::Dependency
|
201
215
|
name: em-http-request
|
202
216
|
prerelease: false
|
203
|
-
requirement: &
|
217
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
204
218
|
none: false
|
205
219
|
requirements:
|
206
220
|
- - ">="
|
@@ -210,7 +224,7 @@ dependencies:
|
|
210
224
|
- 0
|
211
225
|
version: "0"
|
212
226
|
type: :development
|
213
|
-
version_requirements: *
|
227
|
+
version_requirements: *id014
|
214
228
|
description: A monitoring framework that aims to be simple, malleable, and scalable. Uses the publish/subscribe model.
|
215
229
|
email:
|
216
230
|
- sean.porter@sonian.net
|