Hello Victor,
we use the following to handle program checks.
check program Manager_Coll with path "/usr/local/monit/scripts/emcoll.sh"
if status > 1 then exec "/usr/local/monit/scripts/servnow.sh"
else if succeeded then exec "/usr/local/monit/scripts/servnow.sh"
The "emcoll.sh" script ends with rc 0 if everything works well, but with
a rc 2 (or higher) if something does not work.
> As a test we disable the ntp service and nothing happens.
>
> If we run the snow.sh script it connects and a ticket is created with no
> data inside
As long as "ntpStatus.sh" ends with "exit 1" (not 0) and the script
"/snow.sh" is executable, your approach should work.
Best regards,
Lutz
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general