From 08597e725f3a31fa205b4f94ede9662c695f3d54 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Thu, 6 Dec 2012 10:32:50 +0000 Subject: We don't set the .detail field unless we're raising an alert. This will mean historically we can see what the failure reason was. --- lib/custodian/alerts/mauve.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/custodian/alerts') diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb index 300c90c..7c2c89d 100644 --- a/lib/custodian/alerts/mauve.rb +++ b/lib/custodian/alerts/mauve.rb @@ -175,13 +175,14 @@ module Custodian alert.id = "#{test_type}-#{test_host}" alert.subject = subject alert.summary = "The #{test_type} test failed against #{test_host}" - alert.detail = "

The #{test_type} test failed against #{test_host}.

" # # If we're raising then add the error # if ( failure ) + alert.detail = "

The #{test_type} test failed against #{test_host}.

" + # # The text from the job-defition # @@ -196,14 +197,14 @@ module Custodian # Add the test-failure message # alert.detail = "#{alert.detail}

#{test.error()}

" - end - # - # Determine if this is inside/outside the bytemark network - # - location = expand_inside_bytemark( test_host ) - if ( !location.nil? && location.length ) - alert.detail = "#{alert.detail}\n#{location}" + # + # Determine if this is inside/outside the bytemark network + # + location = expand_inside_bytemark( test_host ) + if ( !location.nil? && location.length ) + alert.detail = "#{alert.detail}\n#{location}" + end end # -- cgit v1.2.1