closedLoopAlarm dates in us not in ms

Dates received from other services are in ms, not in ms.

Change-Id: I3e2583f4d7f771a73b12d56c040941fa9d6494cc
Signed-off-by: ac2550 <ac2550@intl.att.com>
Issue-ID: CLAMP-158
diff --git a/extra/docker/elk/logstash-conf/logstash.conf b/extra/docker/elk/logstash-conf/logstash.conf
index dec47b3..0a2caf2 100644
--- a/extra/docker/elk/logstash-conf/logstash.conf
+++ b/extra/docker/elk/logstash-conf/logstash.conf
@@ -52,17 +52,19 @@
     }
     mutate { remove_field => [ "message" ] }
     # express timestamps in milliseconds instead of microseconds
-    ruby {
-        code => "event.set('closedLoopAlarmStart', Integer(event.get('closedLoopAlarmStart')))"
-    }
-    date {
-        match => [ "closedLoopAlarmStart", UNIX_MS ]
-        target => "closedLoopAlarmStart"
+    if [closedLoopAlarmStart] {
+        ruby {
+            code => "event.set('closedLoopAlarmStart', Integer(event.get('closedLoopAlarmStart')) / 1000)"
+        }
+        date {
+            match => [ "closedLoopAlarmStart", UNIX_MS ]
+            target => "closedLoopAlarmStart"
+        }
     }
 
     if [closedLoopAlarmEnd] {
         ruby {
-            code => "event.set('closedLoopAlarmEnd', Integer(event.get('closedLoopAlarmEnd')))"
+            code => "event.set('closedLoopAlarmEnd', Integer(event.get('closedLoopAlarmEnd')) / 1000)"
         }
         date {
             match => [ "closedLoopAlarmEnd", UNIX_MS ]