Hello Martin,
FYI, I fixed my "check program" notification problem by using multiple
status checks to do something and one check to notify the "status
failed" and "status succeeded" only.

check program script.sh with path
/Users/lutz/Aufheben/monit/scripts/script.sh
  if status = 1 then exec "/Users/lutz/Aufheben/monit/scripts/script1.sh"
  if status = 2 then exec "/Users/lutz/Aufheben/monit/scripts/script2.sh"
  if status != 0 then exec "/Users/lutz/Aufheben/monit/scripts/zexec.sh"
    else if succeeded then exec
"/Users/lutz/Aufheben/monit/scripts/zexec.sh"

> you can use multiple status tests within the 'check program' - if the status 
> differs on program success, the second status check should catch it, 
> something like this:
> 
>  check program myprogram with path "/usr/local/bin/helloworld"
>        if status = 0 then exec "/usr/local/bin/script_no_1"
>        if status > 0 then exec "/usr/local/bin/script_no_2"

This way seems to work.
I get notifications and the scripts are called also.

With regards,
Lutz


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

Reply via email to