Hi,
I'v create advanced watcher
the part of input is
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"phplog-*"
],
"rest_total_hits_as_int": true,
"body": {
"size": 0,
"query": {
"bool": {
"filter": [
{
"match": {
"type": "response_log"
}
},
{
"range": {
"@timestamp": {
"gte": "now-3d/d",
"to": "now"
}
}
}
]
}
},
"aggs": {
"group_by_route": {
"terms": {
"field": "route_format.keyword",
"size": 999
},
"aggs": {
"group_by_method": {
"terms": {
"field": "method.keyword",
"size": 10
},
"aggs": {
"baseline": {
"avg": {
"field": "execution_time"
}
},
"short": {
"range": {
"field": "@timestamp",
"ranges": [
{
"from": "now-1h",
"to": "now"
}
]
},
"aggs": {
"current": {
"avg": {
"field": "execution_time"
}
}
}
}
}
}
}
}
}
}
}
}
}
when watcher execution less than 1 min, it can get correct result
"result": {
"execution_time": "2020-10-21T02:05:00.446Z",
"execution_duration": 46471,
"input": {
"type": "search",
"status": "success",
"payload": {
"_shards": {
"total": 72,
"failed": 0,
"successful": 72,
"skipped": 0
},
"hits": {
"hits": [],
"total": 10000,
"max_score": null
},
"took": 45935,
"_clusters": {
"total": 1,
"successful": 1,
"skipped": 0
},
"timed_out": false,
"aggregations": {
"group_by_route": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"doc_count": 571632628,
"group_by_method": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
~~~
but when "execution_duration" larger than 1 min , I got result likes
"type": "timeout_exception",
"reason": "java.util.concurrent.TimeoutException: Timeout waiting for task."
"result": {
"execution_time": "2020-10-20T18:05:00.374Z",
"execution_duration": 60000,
"input": {
"type": "search",
"status": "failure",
"error": {
"root_cause": [
{
"type": "timeout_exception",
"reason": "java.util.concurrent.TimeoutException: Timeout waiting for task."
}
],
"type": "timeout_exception",
"reason": "java.util.concurrent.TimeoutException: Timeout waiting for task.",
"caused_by": {
"type": "timeout_exception",
"reason": "Timeout waiting for task."
}
},
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"phplog:phplog-*"
],
"rest_total_hits_as_int": true,
"body": {
"size": 0,
"query": {
"bool": {
"filter": [
{
"match": {
~~~
Is it possible to increase search timeout in watcher ?
thank you !