# Does watcher input uses script

**URL:** <https://discuss.elastic.co/t/does-watcher-input-uses-script/285868>\
**Category:** Elasticsearch\
**Created:** [October 5, 2021, 3:11am UTC](https://discuss.elastic.co/t/does-watcher-input-uses-script/285868 "2021-10-05T03:11:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munavir\_Chavody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munavir_chavody/32/87951_2.png) [@Munavir\_Chavody](https://discuss.elastic.co/u/Munavir_Chavody)\
**Post date:** [October 5, 2021, 3:11am UTC](https://discuss.elastic.co/t/does-watcher-input-uses-script/285868/1 "2021-10-05T03:11:06Z")

</div>

I'm getting dynamic execution circuit breaking error for many watchers in our environment saying that the input search query failed to compile.

What is the reason for the same. How can we avoid such errors at all?

Error:

 ![heatbeat-prodazje](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8e6a85a92d67499ebb2d9c148fabe8c76ef8da04.jpeg)

Watcher:

```auto
"input": {
    "search": {
      "request": {
        "search_type": "query_then_fetch",
        "indices": [
          "heartbeat-*"
        ],
        "rest_total_hits_as_int": true,
        "body": {
          "query": {
            "bool": {
              "must": [
                {
                  "range": {
                    "@timestamp": {
                      "gte": "now-5m"
                    }
                  }
                },
                {
                  "term": {
                    "monitor.name": " *******"
                  }
                },
                {
                  "term": {
                    "monitor.status": "down"
                  }
                }
              ]
            }
          },
          "size": 100
        }
      }
    }
  }

```

---

<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:** [November 2, 2021, 3:11am UTC](https://discuss.elastic.co/t/does-watcher-input-uses-script/285868/2 "2021-11-02T03:11:40Z")

</div>

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