Hello Lutz, thnx, this solved the problem with the wrong status.. 'monit status' and 'monit summary‘ now giving the correct status.
It even seems that I do not need the first ‚if failed ping then alert‘, because ‚if failed ping then exec …‘ also sends a mail in parallel. Jürgen > Am 28.07.2025 um 21:30 schrieb Lutz Mader <[email protected]>: > > Hello Juergen, > based on your sample snipped, > you should have a look to NETWORK PING TEST, > https://mmonit.com/monit/documentation/monit.html#NETWORK-PING-TEST > >> check host somehost.exmaple.org with address 10.11.12.13 >> if failed ping then alert >> if failed ping then exec /root/bin/notify.sh >> if succeeded ping then exec /root/bin/notify.sh > > From my point of view, the proper test should look like this. > > check host somehost.exmaple.org with address 10.11.12.13 > if failed ping then alert > if failed ping then exec /root/bin/notify.sh > else if succeeded then exec /root/bin/notify.sh > > "if failed ..." will send an alert if the ping failed and "else if > succeeded ..." will send a recovery alert. > > The test icmp was changed to ping a long time ago (with 5.9.0), I get > "ICMP failed" if ping failed (with 5.35.0). > > A suggestion only, > Lutz >
