# Watcher input, simple query without body

**URL:** <https://discuss.elastic.co/t/watcher-input-simple-query-without-body/234184>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [May 25, 2020, 5:18pm UTC](https://discuss.elastic.co/t/watcher-input-simple-query-without-body/234184 "2020-05-25T17:18:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Incauto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incauto/32/60149_2.png) [@Incauto](https://discuss.elastic.co/u/Incauto)\
**Post date:** [May 25, 2020, 5:18pm UTC](https://discuss.elastic.co/t/watcher-input-simple-query-without-body/234184/1 "2020-05-25T17:18:33Z")

</div>

Hi I wanto to run a Watch with the disk space available in a node, but I dont know how to use this query:

```auto
GET _cat/nodes?h=h,diskAvail

```

in the context of the Watcher input, because this query has no body, no indices to use, nor timestamp.

How can I do this?  
Example of a normal Watcher input

`````auto
"input": {
    "search": {
      "request": {
        "search_type": "query_then_fetch",
        "indices": [
          "index*"
        ],
        "rest_total_hits_as_int": true,
        "body": {
          "size": 0,
          "query": {
            "bool": {
              "filter": {
                "range": {
                  "@timestamp": {
                    "gte": "{{ctx.trigger.scheduled_time}}||-5m",
                    "lte": "{{ctx.trigger.scheduled_time}}",
                    "format": "strict_date_optional_time||epoch_millis"
                  }
                }
              }
            }
          }
        }
      }
    }
  },````
`````

---

<div class="post-metadata">

**Author:** ![andres-perez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres-perez/32/136461_2.png) [@andres-perez](https://discuss.elastic.co/u/andres-perez)\
**Post date:** [May 25, 2020, 6:06pm UTC](https://discuss.elastic.co/t/watcher-input-simple-query-without-body/234184/2 "2020-05-25T18:06:01Z")

</div>

Hi!  
Instead of search input, you can use [http input](https://www.elastic.co/guide/en/elasticsearch/reference/current/input-http.html)

There is a related example in the documentation: [https://www.elastic.co/guide/en/elasticsearch/reference/current/watch-cluster-status.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/watch-cluster-status.html)

If you use monitoring, there is also a related example that leverages the internal indexes used for that feature and search input:

> **[elastic/examples](https://github.com/elastic/examples/tree/master/Alerting/Sample%20Watches/monitoring_free_disk_space)**
>
> Home for Elasticsearch examples available to everyone. It's a great way to get started. - elastic/examples

---

<div class="post-metadata">

**Author:** ![Incauto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incauto/32/60149_2.png) [@Incauto](https://discuss.elastic.co/u/Incauto)\
**Post date:** [May 25, 2020, 6:09pm UTC](https://discuss.elastic.co/t/watcher-input-simple-query-without-body/234184/3 "2020-05-25T18:09:11Z")

</div>

Gracias Andres!

---

<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:** [June 22, 2020, 6:09pm UTC](https://discuss.elastic.co/t/watcher-input-simple-query-without-body/234184/4 "2020-06-22T18:09:21Z")

</div>

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