# X-Pack watch for storage usage (disk usage)

**URL:** <https://discuss.elastic.co/t/x-pack-watch-for-storage-usage-disk-usage/99762>\
**Category:** Elasticsearch\
**Created:** [September 7, 2017, 7:20pm UTC](https://discuss.elastic.co/t/x-pack-watch-for-storage-usage-disk-usage/99762 "2017-09-07T19:20:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlorinAndrei](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@FlorinAndrei](https://discuss.elastic.co/u/FlorinAndrei)\
**Post date:** [September 7, 2017, 7:20pm UTC](https://discuss.elastic.co/t/x-pack-watch-for-storage-usage-disk-usage/99762/1 "2017-09-07T19:20:44Z")

</div>

I'm looking at this example:

[https://www.elastic.co/guide/en/x-pack/current/watch-cluster-status.html](https://www.elastic.co/guide/en/x-pack/current/watch-cluster-status.html)

```
PUT _xpack/watcher/watch/cluster_health_watch
{
  "trigger" : {
    "schedule" : { "interval" : "10s" }
  },
  "input" : {
    "http" : {
      "request" : {
       "host" : "localhost",
       "port" : 9200,
       "path" : "/_cluster/health"
      }
    }
  },
  "condition" : {
    "compare" : {
      "ctx.payload.status" : { "eq" : "red" }
    }
  },
  "actions" : {
    "send_email" : {
      "email" : {
        "to" : "<username>@<domainname>",
        "subject" : "Cluster Status Warning",
        "body" : "Cluster status is RED"
      }
    }
  }
}

```

My question is - how do I do something like that, but instead monitoring the storage usage (disk usage) for a cluster? What are the `input` and `condition` sections required to do that?

It's okay if monitoring / alerting is done per node instead of per cluster.

The question probably applies in a more general context, but I am specifically interested in using this kind of monitoring for clusters hosted at Elastic Cloud.

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [September 7, 2017, 11:06pm UTC](https://discuss.elastic.co/t/x-pack-watch-for-storage-usage-disk-usage/99762/2 "2017-09-07T23:06:25Z")

</div>

You are really going to love our new watcher UI coming in Kibana v6.0:

[![](https://www.elastic.co/assets/bltf6b56e7b8d1add61/28726948-dbf87256-7388-11e7-88ea-7dbfa4f8c4c7.gif) ](https://www.elastic.co/assets/bltf6b56e7b8d1add61/28726948-dbf87256-7388-11e7-88ea-7dbfa4f8c4c7.gif)

Source: [https://www.elastic.co/blog/kibana-6-0-0-beta1-released](https://www.elastic.co/blog/kibana-6-0-0-beta1-released)

But in the meantime, I recommend leveraging the awesome examples in our public examples Github repo:

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

Cheers

---

<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:** [October 5, 2017, 11:07pm UTC](https://discuss.elastic.co/t/x-pack-watch-for-storage-usage-disk-usage/99762/3 "2017-10-05T23:07:14Z")

</div>

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