X-Pack watch for storage usage (disk usage)

I'm looking at this example:

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.

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

Source: 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:

Cheers

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