diff options
| author | Steve Kemp <steve@steve.org.uk> | 2015-02-12 10:27:36 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2015-02-12 10:27:36 +0000 | 
| commit | e84aa0f5e78931be8e9d48227371eae27e653928 (patch) | |
| tree | cacdff5405209ac71305044a49edefc807c84a7d | |
| parent | 1c87277e5210044abad8cea39423a4677e237680 (diff) | |
Make the test-definition available to the redis-alerter.
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | lib/custodian/alerts/redis-state.rb | 6 | 
2 files changed, 10 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 834069c..9442a81 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +custodian (0.23) stable; urgency=medium + +  * Updated the redis-alerter to make the test-definition available. + + -- Steve Kemp <steve@bytemark.co.uk>  Thu, 12 Feb 2015 10:33:01 +0000 +  custodian (0.22) stable; urgency=medium    * Updated the way we save state in Redis, in the redis-alerter. 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 )  | 
