From d09494e159cc2dab9bc665c19005e3fc39b9df39 Mon Sep 17 00:00:00 2001
From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk>
Date: Thu, 23 Aug 2018 13:37:18 +0100
Subject: [PATCH] Updates TICK script templates

---
 src/service/resources/TICKscript/deadman-template.tick   | 2 ++
 src/service/resources/TICKscript/relative-template.tick  | 2 ++
 src/service/resources/TICKscript/threshold-template.tick | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/src/service/resources/TICKscript/deadman-template.tick b/src/service/resources/TICKscript/deadman-template.tick
index e28851c..23a3f9b 100644
--- a/src/service/resources/TICKscript/deadman-template.tick
+++ b/src/service/resources/TICKscript/deadman-template.tick
@@ -22,5 +22,7 @@ stream
         .measurement(measurement)
         .where(whereClause)
     | deadman(throughputThreshold, alertPeriod)
+        .id(topicID)
+        .details('db=' + db + ',measurement=' + measurement)
         .message(messageValue)
         .topic(topicID)
diff --git a/src/service/resources/TICKscript/relative-template.tick b/src/service/resources/TICKscript/relative-template.tick
index d892a96..7ca1095 100644
--- a/src/service/resources/TICKscript/relative-template.tick
+++ b/src/service/resources/TICKscript/relative-template.tick
@@ -38,6 +38,8 @@ past
         .keep()
         .as('diff')
     | alert()
+        .id(topicID)
+        .details('db=' + db + ',measurement=' + measurement)
         .crit(comparisonLambda)
         .message(messageValue)
         .topic(topicID)
\ No newline at end of file
diff --git a/src/service/resources/TICKscript/threshold-template.tick b/src/service/resources/TICKscript/threshold-template.tick
index 3118be4..8597eee 100644
--- a/src/service/resources/TICKscript/threshold-template.tick
+++ b/src/service/resources/TICKscript/threshold-template.tick
@@ -24,6 +24,8 @@ batch
         .period(alertPeriod)
         .every(alertPeriod)
     |alert()
+        .id(topicID)
+        .details('db=' + db + ',measurement=' + measurement)
         .crit(comparisonLambda)
         .message(messageValue)
         .topic(topicID)
-- 
GitLab