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.