diff options
author | 2020-02-10 17:31:22 +0000 | |
---|---|---|
committer | 2020-02-10 17:31:22 +0000 | |
commit | 041255236fde0fbe4c10533d5fc99dcc74db575f (patch) | |
tree | deb7cfda039fb7a9482cce80e70541ac7bafb910 /extra/docker/elk/tools/EsAutoQuery/timeSince.json | |
parent | 2edce92732cfd5513c6bd9665ac808c4ecce85dc (diff) | |
parent | e06b7efed417389decbf043b5fa7bf7253652583 (diff) |
Merge "Removal of ELK"
Diffstat (limited to 'extra/docker/elk/tools/EsAutoQuery/timeSince.json')
-rw-r--r-- | extra/docker/elk/tools/EsAutoQuery/timeSince.json | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/extra/docker/elk/tools/EsAutoQuery/timeSince.json b/extra/docker/elk/tools/EsAutoQuery/timeSince.json deleted file mode 100644 index 6ee14933d..000000000 --- a/extra/docker/elk/tools/EsAutoQuery/timeSince.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "query" : { - "match_all": {} - }, - "script_fields" : { - "timeSince" : { - "script" : { - "lang": "painless", - "source": " -long now = System.currentTimeMillis(); -if (doc.get('closedLoopEventStatus.keyword').value == 'ABATED') { - return now - doc.get('closedLoopAlarmEnd').value; -} -if (doc.get('closedLoopEventStatus.keyword').value == 'ONSET') { - return now - doc.get('closedLoopAlarmStart').value; -} -if (doc.containsKey('notification.keyword')) { - return now - doc.get('notificationTime').value; -} - -return null -" - } - } - , "closedLoopAlarmStart" : { - "script" : { - "lang": "painless", - "source": "doc['closedLoopAlarmStart']" - } - } - , "closedLoopEventStatus" : { - "script" : { - "lang": "painless", - "source": "doc['closedLoopEventStatus.keyword']" - } - } - , "notification" : { - "script" : { - "lang": "painless", - "source": "doc['notification.keyword']" - } - } - , "notificationTime" : { - "script" : { - "lang": "painless", - "source": "doc['notificationTime'].value" - } - } - - } -} |