I use Monit to quick check uptime of Elasticsearch service.
Here is my configuration:
check host [Elasticsearch]-test with address 1.2.3.4
if failed
port 9200
protocol http
then exec "/alerting/monit2telegram/monit2telegram.sh"
It means: when monit cannot do a http request to port 9200, then receive a notification to telegram. It works perfectly when my elastic is down.
But when host is back to normal, how can i configure monit that push alert/exec to remind?