Last active
September 5, 2016 19:30
-
-
Save jeffeDivert/d8ac09a2ef85e9341ae13fe992242443 to your computer and use it in GitHub Desktop.
Execute Watch heartbeat_test_018 with resolved time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_id": "heartbeat_test_018_1-2016-09-05T19:29:29.146Z", | |
"watch_record": { | |
"watch_id": "heartbeat_test_018", | |
"state": "execution_not_needed", | |
"trigger_event": { | |
"type": "manual", | |
"triggered_time": "2016-09-05T19:29:29.146Z", | |
"manual": { | |
"schedule": { | |
"scheduled_time": "2016-09-05T19:29:29.146Z" | |
} | |
} | |
}, | |
"input": { | |
"search": { | |
"request": { | |
"search_type": "query_then_fetch", | |
"indices": [ | |
"hbtest03" | |
], | |
"types": [], | |
"body": { | |
"size": 0, | |
"aggs": { | |
"lastheartbeat": { | |
"terms": { | |
"field": "sn" | |
}, | |
"aggs": { | |
"recent_beats": { | |
"top_hits": { | |
"size": 1, | |
"sort": [ | |
{ | |
"sql_time": { | |
"order": "desc" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"condition": { | |
"array_compare": { | |
"ctx.payload.aggregations.lastheartbeat.buckets": { | |
"path": "recent_beats.hits.hits.0._source.sql_time", | |
"lte": { | |
"value": "<{now-8h}>", | |
"quantifier": "some" | |
} | |
} | |
} | |
}, | |
"messages": [], | |
"result": { | |
"execution_time": "2016-09-05T19:29:29.146Z", | |
"execution_duration": 0, | |
"input": { | |
"type": "search", | |
"status": "success", | |
"payload": { | |
"_shards": { | |
"total": 0, | |
"failed": 0, | |
"successful": 0 | |
}, | |
"hits": { | |
"hits": [], | |
"total": 0, | |
"max_score": 0 | |
}, | |
"took": 1, | |
"timed_out": false | |
}, | |
"search": { | |
"request": { | |
"search_type": "query_then_fetch", | |
"indices": [ | |
"hbtest03" | |
], | |
"types": [], | |
"template": { | |
"template": { | |
"size": 0, | |
"aggs": { | |
"lastheartbeat": { | |
"terms": { | |
"field": "sn" | |
}, | |
"aggs": { | |
"recent_beats": { | |
"top_hits": { | |
"size": 1, | |
"sort": [ | |
{ | |
"sql_time": { | |
"order": "desc" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
}, | |
"params": { | |
"ctx": { | |
"metadata": null, | |
"watch_id": "heartbeat_test_018", | |
"id": "heartbeat_test_018_1-2016-09-05T19:29:29.146Z", | |
"trigger": { | |
"triggered_time": "2016-09-05T19:29:29.146Z", | |
"scheduled_time": "2016-09-05T19:29:29.146Z" | |
}, | |
"vars": {}, | |
"execution_time": "2016-09-05T19:29:29.146Z" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"condition": { | |
"type": "array_compare", | |
"status": "success", | |
"met": false, | |
"array_compare": { | |
"resolved_values": { | |
"ctx.payload.aggregations.lastheartbeat.buckets": [], | |
"now-8h": "2016-09-05T11:29:29.146Z" | |
} | |
} | |
}, | |
"actions": [] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment