sensu 0.9.8.beta.1 → 0.9.8.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +16 -0
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/server.rb +24 -22
- metadata +22 -22
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 0.9.8 - TBD
|
2
|
+
|
3
|
+
### Features
|
4
|
+
|
5
|
+
Aggregates, pooling and summarizing check results, very handy for
|
6
|
+
monitoring a horizontally scaled or distributed system.
|
7
|
+
|
8
|
+
Event handler severities, only handle events that have specific
|
9
|
+
severities.
|
10
|
+
|
11
|
+
### Other
|
12
|
+
|
13
|
+
Fixed flap detection.
|
14
|
+
|
15
|
+
Gracefully handle possible failed RabbitMQ authentication.
|
16
|
+
|
1
17
|
## 0.9.7 - 2012-09-20
|
2
18
|
|
3
19
|
### Features
|
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/server.rb
CHANGED
@@ -124,26 +124,23 @@ module Sensu
|
|
124
124
|
subdue && subdue_at == (check[:subdue][:at] || 'handler').to_sym
|
125
125
|
end
|
126
126
|
|
127
|
-
def
|
128
|
-
handler_list
|
129
|
-
when event[:check].has_key?(:handlers)
|
130
|
-
event[:check][:handlers]
|
131
|
-
when event[:check].has_key?(:handler)
|
132
|
-
[event[:check][:handler]]
|
133
|
-
else
|
134
|
-
['default']
|
135
|
-
end
|
136
|
-
handlers = handler_list.inject(Array.new) do |handlers, handler_name|
|
127
|
+
def derive_handlers(handler_list, nested=false)
|
128
|
+
handler_list.inject(Array.new) do |handlers, handler_name|
|
137
129
|
if @settings.handler_exists?(handler_name)
|
138
130
|
handler = @settings[:handlers][handler_name]
|
139
131
|
if handler[:type] == 'set'
|
140
|
-
|
132
|
+
unless nested
|
133
|
+
handlers = handlers + derive_handlers(handler[:handlers], true)
|
134
|
+
else
|
135
|
+
@logger.error('handler sets cannot be nested', {
|
136
|
+
:handler => handler
|
137
|
+
})
|
138
|
+
end
|
141
139
|
else
|
142
140
|
handlers.push(handler)
|
143
141
|
end
|
144
142
|
else
|
145
|
-
@logger.
|
146
|
-
:event => event,
|
143
|
+
@logger.error('unknown handler', {
|
147
144
|
:handler => {
|
148
145
|
:name => handler_name
|
149
146
|
}
|
@@ -151,15 +148,21 @@ module Sensu
|
|
151
148
|
end
|
152
149
|
handlers.uniq
|
153
150
|
end
|
151
|
+
end
|
152
|
+
|
153
|
+
def event_handlers(event)
|
154
|
+
handler_list = case
|
155
|
+
when event[:check].has_key?(:handlers)
|
156
|
+
event[:check][:handlers]
|
157
|
+
when event[:check].has_key?(:handler)
|
158
|
+
[event[:check][:handler]]
|
159
|
+
else
|
160
|
+
['default']
|
161
|
+
end
|
162
|
+
handlers = derive_handlers(handler_list)
|
154
163
|
event_severity = Sensu::SEVERITIES[event[:check][:status]] || 'unknown'
|
155
164
|
handlers.select do |handler|
|
156
|
-
if handler[:
|
157
|
-
@logger.error('handler sets cannot be nested', {
|
158
|
-
:event => event,
|
159
|
-
:handler => handler
|
160
|
-
})
|
161
|
-
false
|
162
|
-
elsif handler.has_key?(:severities) && !handler[:severities].include?(event_severity)
|
165
|
+
if handler.has_key?(:severities) && !handler[:severities].include?(event_severity)
|
163
166
|
@logger.debug('handler does not handle event severity', {
|
164
167
|
:event => event,
|
165
168
|
:handler => handler
|
@@ -236,8 +239,7 @@ module Sensu
|
|
236
239
|
block.call(output)
|
237
240
|
end
|
238
241
|
else
|
239
|
-
@logger.
|
240
|
-
:event => event,
|
242
|
+
@logger.error('unknown mutator', {
|
241
243
|
:mutator => {
|
242
244
|
:name => mutator_name
|
243
245
|
}
|
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.9.8.beta.
|
4
|
+
version: 0.9.8.beta.2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-10-
|
13
|
+
date: 2012-10-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: eventmachine
|
17
|
-
requirement: &
|
17
|
+
requirement: &9708760 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - =
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 1.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *9708760
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: amqp
|
28
|
-
requirement: &
|
28
|
+
requirement: &9707060 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - =
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 0.9.7
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *9707060
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: json
|
39
|
-
requirement: &
|
39
|
+
requirement: &9706020 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *9706020
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: cabin
|
50
|
-
requirement: &
|
50
|
+
requirement: &9703280 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - =
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 0.4.4
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *9703280
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: ruby-redis
|
61
|
-
requirement: &
|
61
|
+
requirement: &9700500 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - =
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 0.0.2
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *9700500
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: thin
|
72
|
-
requirement: &
|
72
|
+
requirement: &9698660 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - =
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 1.5.0
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *9698660
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: async_sinatra
|
83
|
-
requirement: &
|
83
|
+
requirement: &9697480 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - =
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: 1.0.0
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *9697480
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: rake
|
94
|
-
requirement: &
|
94
|
+
requirement: &9696760 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *9696760
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: em-spec
|
105
|
-
requirement: &
|
105
|
+
requirement: &9696120 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *9696120
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: em-http-request
|
116
|
-
requirement: &
|
116
|
+
requirement: &9695580 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,7 +121,7 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *9695580
|
125
125
|
description: A monitoring framework that aims to be simple, malleable, and scalable.
|
126
126
|
Uses the publish/subscribe model.
|
127
127
|
email:
|