diff options
author | ac2550 <ac2550@intl.att.com> | 2018-03-20 12:35:48 +0100 |
---|---|---|
committer | ac2550 <ac2550@intl.att.com> | 2018-03-20 13:13:38 +0100 |
commit | 5082fd7ed2037dfdb9c37ae60b77bc3165262663 (patch) | |
tree | 2c78b8ff995d15b245b878bdde187a70bad016e5 /extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json | |
parent | 3dc5f2a4a5c066a57ef0ce346be884b045ae73c9 (diff) |
Adding CLAMP Dashboard
Change-Id: I0496fa7303dbeaf72b00e4382f71bdb0069abb9a
Issue-ID: CLAMP-77
Signed-off-by: ac2550 <ac2550@intl.att.com>
Diffstat (limited to 'extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json')
-rw-r--r-- | extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json b/extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json new file mode 100644 index 00000000..5a295454 --- /dev/null +++ b/extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json @@ -0,0 +1,34 @@ +{ + "query" : { + "bool": { + "must": [ + { "match": { "closedLoopEventStatus": "ABATED" } } + ] + } + }, + "script_fields" : { + "closedLoopAlarmDuration" : { + "script" : { + "lang": "painless", + "source": " +if (doc.get('closedLoopEventStatus.keyword').value == 'ABATED') { + return doc.get('closedLoopAlarmEnd').value - doc.get('closedLoopAlarmStart').value; +} +return null +" + } + } + , "closedLoopAlarmStart" : { + "script" : { + "lang": "painless", + "source": "doc['closedLoopAlarmStart']" + } + } + , "closedLoopAlarmEnd" : { + "script" : { + "lang": "painless", + "source": "doc['closedLoopAlarmEnd']" + } + } + } +} |