0

Monit is currently executing once. I can see in the log file that it does a check every cycle, however, the execution only happens once when I reload monit.

check host somehost with address example.com
# every "* 8-19 * * 1-5"
 if failed
    port 443
    protocol https
    and certificate valid > 1095 days
 then exec "/var/local/bin/mtCert.sh"
Adilp
  • 103
  • 2

1 Answers1

0

That is how monit is designed to operate. See https://mmonit.com/monit/documentation/monit.html

The program is executed only once if the test fails. You can enable execute repetition if the error persists for a given number of cycles.

Adding repeat every cycle should satisfy your requirements. Note the same is true for alerts.

Mark Wagner
  • 17,764
  • 2
  • 30
  • 47