I am currently polling an endpoint over https for the cluster's health status, and I would like an alert sent if the returned status is a certain value and if it's not between certain times in the day (when our logs rotate, which causes a yellow status).
I'm not sure how/whether I should be converting ctx.execution_time (what's an easy way to tell if it's a string or date type within a script?) and any parameters I pass seem to be treated as strings.
What's the best way to do this? Thanks in advance!
thanks for reporting. We should indeed return a proper error message, when you specify more than one field. If you GET the watch, the first condition will be gone. I opened #31852 to fix this in the future.
Using a script condition is indeed the way to go here. However you cannot use date math in there, this only works when specifying indices or inside of queries, but not when doing scripting. Instead you need to do something like this
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.