summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-14 09:03:54 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-14 09:03:54 +0000
commit8fb74c5fb07df9e04d07de2210ec6685da56b85e (patch)
treea7ac7ca31dcbe8d60e29d9a0af851d7c88e991e5
parentada7765a83d7112c44c64a65e3c7b5972a2df8fd (diff)
Actually raise & clear alerts now - wire priority to be "low"
-rwxr-xr-xbin/custodian-dequeue9
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue
index 99ea63f..3408f2d 100755
--- a/bin/custodian-dequeue
+++ b/bin/custodian-dequeue
@@ -92,16 +92,13 @@ class Alert
#
def raise( detail )
- puts "RAISE: #{detail}"
- return
-
update = Mauve::Proto::AlertUpdate.new
update.alert = []
update.source = "custodian"
update.replace = true
alert = Mauve::Proto::Alert.new
- alert.id = @details['test_type']
+ alert.id = "#{@details['test_type']}-low"
alert.summary = "#{@details['test_host']} #{@details['test_alert']}"
alert.detail = "The #{@details['test_type']} test failed against #{@details['test_host']}: #{detail}"
alert.raise_time = Time.now.to_i
@@ -115,8 +112,6 @@ class Alert
# Clear the alert.
#
def clear
- puts "CLEAR"
- return
update = Mauve::Proto::AlertUpdate.new
update.alert = []
@@ -124,7 +119,7 @@ class Alert
update.replace = true
alert = Mauve::Proto::Alert.new
- alert.id = @details['test_type']
+ alert.id = "#{@details['test_type']}-low"
alert.summary = "#{@details['test_host']} #{@details['test_alert']}"
alert.detail = "The #{@details['test_type']} test succeeded against #{@details['test_host']}"
alert.clear_time = Time.now.to_i