Skip to content

Instantly share code, notes, and snippets.

@jeffeDivert
Created September 5, 2016 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffeDivert/a56c7c8312d89c41a5c363f2231ba995 to your computer and use it in GitHub Desktop.
Save jeffeDivert/a56c7c8312d89c41a5c363f2231ba995 to your computer and use it in GitHub Desktop.
Execute Watch heartbeat_test_018
{
"_id": "heartbeat_test_018_1-2016-09-05T19:11:11.538Z",
"watch_record": {
"watch_id": "heartbeat_test_018",
"state": "execution_not_needed",
"trigger_event": {
"type": "manual",
"triggered_time": "2016-09-05T19:11:11.538Z",
"manual": {
"schedule": {
"scheduled_time": "2016-09-05T19:11:11.538Z"
}
}
},
"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": "doc_count",
"lte": {
"value": 25000,
"quantifier": "some"
}
}
}
},
"messages": [],
"result": {
"execution_time": "2016-09-05T19:11:11.538Z",
"execution_duration": 1,
"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:11:11.538Z",
"trigger": {
"triggered_time": "2016-09-05T19:11:11.538Z",
"scheduled_time": "2016-09-05T19:11:11.538Z"
},
"vars": {},
"execution_time": "2016-09-05T19:11:11.538Z"
}
}
}
}
}
},
"condition": {
"type": "array_compare",
"status": "success",
"met": false,
"array_compare": {
"resolved_values": {
"ctx.payload.aggregations.lastheartbeat.buckets": []
}
}
},
"actions": []
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment