Warning: Program is not executable

Issue #165 closed
Former user created an issue

I included previous thread below. When I try to include executable file like below

check file web.log with path /var/log/locutus/web.log if changed timestamp then exec "/etc/monit/script/borg_error_log.sh"

It throws error like "/etc/monit/monitrc:276: Warning: Program is not executable: '/etc/monit/script/borg_error_log.sh'"

also let me know how i can assign the result to $MONIT_DESCRIPTION or $DESCRIPTION

Thanks, Muthu


Previous reply :

You can use "exec" action with custom script ... it can for example grab part of the application log and send it via mail. The script will get information about the event in environment variables with MONIT_ prefix. See Monit manual for more details: http://mmonit.com/monit/documentation/monit.html#GENERAL-SYNTAX http://mmonit.com/monit/documentation/monit.html#ENVIRONMENT

Comments (1)

  1. Tildeslash repo owner

    The program should be executable ... check "ls -l /etc/monit/script/borg_error_log.sh" output, the mode should be for example 755.

    Monit sets the value of $MONIT_DESCRIPTION automatically when executing the program - you can read it in the script and modify before sending alert.

    Please not that the bitbucket "issues" are meant to be used for bugs and feature requests - not for generic questions, please use monit forum it: https://lists.nongnu.org/mailman/listinfo/monit-general

  2. Log in to comment