Monit – How to Check Script Result with Monit

monitmonitoring

Is there a way to check the result of a script with monit? For example a script returns 0 means ok, but 1 means failed. The idea is to call the script from monit on the local machine directly and interpret the result and send emails.

For example a script could do some hardware check.

My workaround is to call the script with cron and write the result to a file and check the file with monit.

Best Answer

Your work-around is the recommended way to do it with monit from what I've read.