Hi all,
I have a watcher in Kibana that doesn't work (condition is if ctx.payload.hits.total == 0, then send notification via slack). BUT:
If you check the Execution Output of Watcher you can see that there are no totals, hits, shards etc (so as i understand watcher see nothing, or smth is blocking it).
But if i go to Simulate this watcher i will have results and Watcher will not send mail/slack notification whatever i use in actions - as stats a really presented (checked in discovery, visualizations etc)
Can someone advice what is wrong with Watcher, cause it doesn't work, should find stats and not notify me.
Really thanks in advance!
When it worked by itself:
"metadata": {
"xpack": {
"type": "json"
}
},
"result": {
"execution_time": "2018-06-18T12:21:46.677Z",
"execution_duration": 82,
"input": {
"type": "search",
"status": "success",
"payload": {
"_shards": {
"total": 0,
"failed": 0,
"successful": 0,
"skipped": 0
},
"hits": {
"hits": [],
"total": 0,
"max_score": 0
},
"took": 2,
"timed_out": false
},
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"name"
],
"types": [
"events"
"condition": {
"type": "script",
"status": "success",
"met": true
},
"actions": [
{
"id": "notify-slack",
"type": "slack",
"status": "success",
"slack": {
"account": "name_acc",
"sent_messages": [
{
"status": "success",
"to": "#name",
"message": {
"from": "Kibana - Name",
"text": " ",
"attachments": [
{
"title": "NO results",
"text": "There were no results within the last 30 min"
}
]
}
}
]
}
}
]
},
"messages": []
}