monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monit: 'Matching' functionality isn't working


From: Martin Pala
Subject: Re: Monit: 'Matching' functionality isn't working
Date: Wed, 24 Jun 2015 23:13:23 +0200


> On 24 Jun 2015, at 22:33, Marie Mcallister <address@hidden> wrote:
> 
> 
> ​Hi Martin,
> 
> ​The problem is with the 'Start' command. The proc match works fine, the 
> check detects ​when the process is down.
> ​For example, if I just use this outside of monit, it works fine to bring 
> back the process: ​/usr/bin/nohup /mnt1/build/seeing/build/bin/run.sh &
> 
> ​But if I put that exact line in 'start program' for the check, it fails 
> (looking at the logs, it seems to not be reading past the whitespace break 
> after nohup)​.
> 
> I tried formatting it as such: start program = "/bin/bash -c 'nohup 
> /mnt1/build/seeing/build/bin/run.sh &'" but the same thing occurs.
> 
> ​I have tried using your suggestion as well: start program = "^/bin/bash -c 
> 'nohup /mnt1/build/seeing/build/bin/run.sh &'"
> 
> but that fails​; logs state "Warning: Program does not exist: '^/bin/bash'"
> 
> Is there a known issue with whitespace in 'start' lines, in the current 
> iteration of monit? I found a very old thread where something similar 
> occurred but that was supposedly patched a long time ago.
> 
> Thanks again,
> 
> Marie


The pattern in the process check and the start program are two different things 
- the start program is not regular expression, but regular program to execute. 
Please remove the “^” character from the start program:

        start program = “/bin/bash -c 'nohup 
/mnt1/build/seeing/build/bin/run.sh &'"

Regards,
Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]