[Top][All Lists]

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

Re: Execute Command by Monit Unsuccessful

From: Jay Nicholas
Subject: Re: Execute Command by Monit Unsuccessful
Date: Thu, 25 Sep 2014 16:39:46 -0500


Thank you for your email! I took your advice and made the change; however, it still doesn't work. Here's what the configuration looks like now:

check process stream matching "spa.liq"
if does not exist then exec "/usr/local/bin/liquidsoap /home/jay/scripts/spa.liq &" as uid jay and gid jay

Here is what I see in the log file when I kill the process:

[CDT Sep 25 16:28:23] error    : 'stream' process is not running
[CDT Sep 25 16:28:25] info     : 'stream' exec: /usr/local/bin/liquidsoap
[CDT Sep 25 16:30:25] error    : 'stream' process is not running
[CDT Sep 25 16:30:25] info     : 'stream' exec: /usr/local/bin/liquidsoap

You can see it executes the command. Although the log only shows the first portion of the command before the space. If I execute this identical command on the command line it works with no problem.


On Sep 25, 2014, at 2:31 PM, Martin Pala <address@hidden> wrote:


you have to use full path for the "liquidsoap" command (Monit doesn't use shell to execute the command). You can get the path by "which liquidsoap" command (provided it is in your PATH).


On 25 Sep 2014, at 20:49, Jay Nicholas <address@hidden> wrote:

Hello, all!

I need some advice and I'm hoping someone can assist.

I have a process that runs on my server that I would like to have monitored by monit. The only thing that doesn't work is the following lines in the config file:

 check process stream matching "spa.liq"
 if does not exist then exec "liquidsoap /home/me/scripts/spa.liq &" as uid jay and gid jay

It is able to find the "spa.liq" process because I can see it from the monit web page. However, if I kill the process to test that it starts up it doesn't work. The log files show that it executes the command but it never runs so it just keeps trying.

In addition, this process cannot run as root so I added the "as uid jay and gid jay" so that it runs under my username.

There must be something wrong with this configuration but I can't figure out what it is.



To unsubscribe:

To unsubscribe:

reply via email to

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