summaryrefslogtreecommitdiffstats
path: root/extra/docker/elk/logstash-conf/logstash.conf
diff options
context:
space:
mode:
Diffstat (limited to 'extra/docker/elk/logstash-conf/logstash.conf')
-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 dec47b3c5..0a2caf2f1 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 ]