depends on with check program

Issue #105 resolved
Former user created an issue


When i use a depends on function with a check process like this:

Check process test with pid test Depends on test2 ...

Check program test2

The first output of test2 is "status OK no output" (event if return an error) and the process test start.but the resultat of test2 is not ok, and test process should not start.

Comments (6)

  1. Tildeslash repo owner

    I'm not 100% sure i understand you correctly:

    1.) if you have problem with "check program" status ... monit checks the exit value of the program => if the status test doesn't work as you expect, please provide the check program which you use so we can review.

    2.) the dependency is currently "soft" ... it guarantees only the correct command sequence (if for example "test2" fails and is to be restarted, then: "test" is stopped -> "test2" restarted -> "test" started, but without "hard" dependency enforced => if test2 didn't recover, test start is not suppressed. This is well-known design limitation, we'll fix this in the future.

  2. Anthony Cabero

    Sorry for my bad english. Thank you for your answer. I dont have problems with check program status, the exit value work.

    I want my 'check process test' start only if my 'check program test2' is OK (exit code 0), but my process test start event if my 'check program test2' return an error exit value.

  3. Tildeslash repo owner

    Thanks for clarification, unfortunately the dependency is "soft" as described in the second point of previous response. We will fix it, but for now i'm putting it on hold until it will get part of the plan for next version.

  4. Log in to comment