Monit check program returns no output

Issue #196 closed
Vovodroid created an issue

Run simplest script:

#!/bin/sh

echo some_string
exit

By

check program somescript with path /root/somescript
   every "* * * * *"
   if status != 0 then alert

What I got is:

Status  Status ok
Last exit value 0
Last output no output

P.S. I testes it in v5.13, but it's unavailable in Version list box.

Comments (2)

  1. Vovodroid reporter
    • changed status to open

    I put date in my script and here is what happens: After monit reload:

    Last started    Sun, 24 May 2015 14:46:57
    Last exit value 0
    Last output no output
    Data collected  Sun, 24 May 2015 14:46:57
    

    After one minute:

    Last started    Sun, 24 May 2015 14:47:58
    Last exit value 0
    Last output Sun May 24 14:46:57 UTC 2015
    Data collected  Sun, 24 May 2015 14:47:58
    

    It seems that output is delayed by one cycle. If I run program once a day I will see yesterday output.

  2. Tildeslash repo owner

    Yes, as noted here, the return from check program is handled in the next cycle. We'll address this problem when we start on the 6.0 branch shortly.

  3. Log in to comment