aboutsummaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorac2550 <ac2550@intl.att.com>2018-05-08 11:10:51 +0200
committerac2550 <ac2550@intl.att.com>2018-05-08 11:10:51 +0200
commit2dc6417f8f6fa7be8974115e042eeebb3c832269 (patch)
tree0644f9dfafad05ace955ac5812870a07f8026b28 /extra
parent96a55871dabf4fa374de16091e165f0dc77bd9f7 (diff)
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
Diffstat (limited to 'extra')
-rw-r--r--extra/docker/elk/logstash-conf/logstash.conf16
1 files changed, 9 insertions, 7 deletions
diff --git a/extra/docker/elk/logstash-conf/logstash.conf b/extra/docker/elk/logstash-conf/logstash.conf
index dec47b3c..0a2caf2f 100644
--- a/extra/docker/elk/logstash-conf/logstash.conf
+++ b/extra/docker/elk/logstash-conf/logstash.conf
@@ -52,17 +52,19 @@ filter {
}
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 ]