summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-02-12 10:27:36 +0000
committerSteve Kemp <steve@steve.org.uk>2015-02-12 10:27:36 +0000
commit16f2d65c6ab50812603e54b62ed9eda5a520bd52 (patch)
tree01387cf89b8897d3c7c7de8a6f844c27e0fd2bb9 /lib
parent958de54ccad1eae6afd12fab8e890857f56b3d2b (diff)
Make the test-definition available to the redis-alerter.release-0.23
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/alerts/redis-state.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/custodian/alerts/redis-state.rb b/lib/custodian/alerts/redis-state.rb
index cf52620..2c3d319 100644
--- a/lib/custodian/alerts/redis-state.rb
+++ b/lib/custodian/alerts/redis-state.rb
@@ -55,11 +55,12 @@ module Custodian
return unless( @redis )
tmp = {}
- tmp["time"] = Time.now.to_i
- tmp["type"] = @test.get_type
+ tmp["time"] = Time.now.to_i
+ tmp["type"] = @test.get_type
tmp["target"] = @test.target
tmp["result"] = "RAISE"
tmp["reason"] = @test.error()
+ tmp["test" ] = @test.to_s
@redis.lpush( "recent-tests", tmp.to_json)
@redis.ltrim( "recent-tests", 0, 100 )
@@ -82,6 +83,7 @@ module Custodian
tmp["target"] = @test.target
tmp["result"] = "OK"
tmp["reason"] = ""
+ tmp["test" ] = @test.to_s
@redis.lpush( "recent-tests", tmp.to_json)
@redis.ltrim( "recent-tests", 0, 100 )