I hope this message finds you all well. I am working in a mechanism that get the Cluster health every now and then to know if elastic is up and running (Green or Yellow) and then trigger an alert in the case the cluster becomes red.
I have noticed that this works very well in most of the situations. Although not wit the Low Watermark thresholds. for instance, I configured the "cluster.routing.allocation.disk.watermark.flood_stage" to something very low like 5%. Elastic reports correctly in the logs that a given index is set to read-only.
My question is, is there a way to get this warning programticaly via an elasticsearch API?