# Kibana monitor is going off when query timesout

**URL:** <https://discuss.elastic.co/t/kibana-monitor-is-going-off-when-query-timesout/193132>\
**Category:** Kibana\
**Created:** [July 31, 2019, 2:00pm UTC](https://discuss.elastic.co/t/kibana-monitor-is-going-off-when-query-timesout/193132 "2019-07-31T14:00:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Hopkins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_hopkins/32/50639_2.png) [@Daniel\_Hopkins](https://discuss.elastic.co/u/Daniel_Hopkins)\
**Post date:** [July 31, 2019, 2:00pm UTC](https://discuss.elastic.co/t/kibana-monitor-is-going-off-when-query-timesout/193132/1 "2019-07-31T14:00:23Z")

</div>

Hey,

So I have a monitor in kibana that queries my elasticsearch to find specific errors and to raise an alert if they are found. The issue I am having though is that when the elasticsearch cluster is under high load the query gets a timeout and this timeout sets off the alert for the error. What I am wondering is if there is any way to force it so that the alert is only raised when the occurrence of a timeout is false. The query that I am currently using is this:

```auto
{
    "size": 500,
    "query": {
        "bool": {
            "must": [
                {
                    "match_all": {
                        "boost": 1
                    }
                },
                {
                    "match_phrase": {
                        "message": {
                            "query": "SQLSTATE[HY000] [2002] Connection refused",
                            "slop": 0,
                            "boost": 1
                        }
                    }
                },
                {
                    "range": {
                        "@timestamp": {
                            "from": "now-60s",
                            "to": "now",
                            "include_lower": true,
                            "include_upper": true,
                            "format": "epoch_millis",
                            "boost": 1
                        }
                    }
                }
            ],
            "adjust_pure_negative": true,
            "boost": 1
        }
    },
    "version": true,
    "_source": {
        "includes": [],
        "excludes": []
    },
    "stored_fields": "*",
    "docvalue_fields": [
        "@timestamp",
        "git_date"
    ],
    "script_fields": {},
    "sort": [
        {
            "@timestamp": {
                "order": "desc",
                "unmapped_type": "boolean"
            }
        }
    ],
    "aggregations": {
        "2": {
            "date_histogram": {
                "field": "@timestamp",
                "time_zone": "Europe/London",
                "interval": "1s",
                "offset": 0,
                "order": {
                    "_key": "asc"
                },
                "keyed": false,
                "min_doc_count": 1
            }
        }
    },
    "highlight": {
        "pre_tags": [
            "@kibana-highlighted-field@"
        ],
        "post_tags": [
            "@/kibana-highlighted-field@"
        ],
        "fragment_size": 2147483647,
        "fields": {
            "*": {}
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![christophilus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophilus/32/42991_2.png) [@christophilus](https://discuss.elastic.co/u/christophilus)\
**Post date:** [August 23, 2019, 7:47pm UTC](https://discuss.elastic.co/t/kibana-monitor-is-going-off-when-query-timesout/193132/2 "2019-08-23T19:47:55Z")

</div>

What's the difference between a false timeout and a real timeout?

---

<div class="post-metadata">

**Author:** ![Daniel\_Hopkins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_hopkins/32/50639_2.png) [@Daniel\_Hopkins](https://discuss.elastic.co/u/Daniel_Hopkins)\
**Post date:** [August 27, 2019, 10:04am UTC](https://discuss.elastic.co/t/kibana-monitor-is-going-off-when-query-timesout/193132/3 "2019-08-27T10:04:30Z")

</div>

They're not types of timeouts. I want to only have the alert go off when the threshold is reached and a timeout has not occurred. Currently if a timeout occurs the alert goes off even though the threshold was not reached.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 24, 2019, 10:04am UTC](https://discuss.elastic.co/t/kibana-monitor-is-going-off-when-query-timesout/193132/4 "2019-09-24T10:04:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
