Hello Victor,
check your "monit.log" file.

> For some reason is not

I don't know what's going wrong. As long as the "ntpStatus.sh" ended
with "exit 1" (or any other value from 1 to 255) your script should be
called.

check program ntp-status with path /usr/local/monit/scripts/script.sh
    if status !=0 then exec "/usr/local/monit/scripts/env.sh"
    #if status != 0 then alert
    group check

I find the following in my "monit.log" file.

[CEST Sep 22 12:25:43] info     : 'ntp-status' status succeeded (0) --
program test script for ntp-status
MONIT_SERVICE=ntp-status
:
[CEST Sep 22 12:27:14] error    : 'ntp-status' status failed (44) --
program test script for ntp-status
MONIT_SERVICE=ntp-status
[CEST Sep 22 12:27:14] info     : 'ntp-status' exec:
'/usr/local/monit/scripts/env.sh'
:
[CEST Sep 22 12:27:44] info     : 'ntp-status' status succeeded (0) --
program test script for ntp-status
MONIT_SERVICE=ntp-status

Have a nice weekend,
Lutz


-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to