sensu 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +15 -0
- data/lib/sensu/api.rb +14 -11
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/server.rb +1 -1
- data/lib/sensu/settings.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## 0.12.1 - 2013-11-02
|
2
|
+
|
3
|
+
### Features
|
4
|
+
|
5
|
+
API GET `/stashes` now returns stash expiration information, time
|
6
|
+
remaining in seconds. eg. [{"path": "foo", "content":{"bar": "baz"},
|
7
|
+
"expire": 3598}].
|
8
|
+
|
9
|
+
### Other
|
10
|
+
|
11
|
+
Fixed a config loading bug where Sensu was not ignoring files without a
|
12
|
+
valid JSON object.
|
13
|
+
|
14
|
+
Fixed `handling event` log line data for extensions.
|
15
|
+
|
1
16
|
## 0.12.0 - 2013-10-28
|
2
17
|
|
3
18
|
### Non-backwards compatible changes
|
data/lib/sensu/api.rb
CHANGED
@@ -642,17 +642,20 @@ module Sensu
|
|
642
642
|
unless stashes.empty?
|
643
643
|
stashes.each_with_index do |path, index|
|
644
644
|
$redis.get('stash:' + path) do |stash_json|
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
645
|
+
$redis.ttl('stash:' + path) do |ttl|
|
646
|
+
unless stash_json.nil?
|
647
|
+
item = {
|
648
|
+
:path => path,
|
649
|
+
:content => Oj.load(stash_json),
|
650
|
+
:expire => ttl
|
651
|
+
}
|
652
|
+
response << item
|
653
|
+
else
|
654
|
+
$redis.srem('stashes', path)
|
655
|
+
end
|
656
|
+
if index == stashes.size - 1
|
657
|
+
body Oj.dump(pagination(response))
|
658
|
+
end
|
656
659
|
end
|
657
660
|
end
|
658
661
|
end
|
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/server.rb
CHANGED
@@ -283,7 +283,7 @@ module Sensu
|
|
283
283
|
log_level = event[:check][:type] == 'metric' ? :debug : :info
|
284
284
|
@logger.send(log_level, 'handling event', {
|
285
285
|
:event => event,
|
286
|
-
:handler => handler
|
286
|
+
:handler => handler.respond_to?(:definition) ? handler.definition : handler
|
287
287
|
})
|
288
288
|
@handlers_in_progress_count += 1
|
289
289
|
on_error = Proc.new do |error|
|
data/lib/sensu/settings.rb
CHANGED
@@ -84,7 +84,7 @@ module Sensu
|
|
84
84
|
if File.file?(file) && File.readable?(file)
|
85
85
|
begin
|
86
86
|
contents = File.open(file, 'r').read
|
87
|
-
config = Oj.load(contents)
|
87
|
+
config = Oj.load(contents, :mode => :strict)
|
88
88
|
merged = deep_merge(@settings, config)
|
89
89
|
unless @loaded_files.empty?
|
90
90
|
changes = deep_diff(@settings, merged)
|
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: 45
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 12
|
9
|
-
-
|
10
|
-
version: 0.12.
|
9
|
+
- 1
|
10
|
+
version: 0.12.1
|
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: 2013-
|
19
|
+
date: 2013-11-02 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|