summaryrefslogtreecommitdiff
path: root/bin
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
commit0dcced1ef1cfe66a1f428696baa8ab7c9f944e29 (patch)
treea7ac7ca31dcbe8d60e29d9a0af851d7c88e991e5 /bin
parent3482f6fe1a2f3f3618ad4416af661bf086d25338 (diff)
Actually raise & clear alerts now - wire priority to be "low"
Diffstat (limited to 'bin')
-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