[Top][All Lists]

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

Re: Script help

From: frwa onto
Subject: Re: Script help
Date: Tue, 26 Jun 2012 17:41:03 +0800

Dear Martin,
                      I have replace like this start program = "/bin/bash -c '/usr/local/yajswstable/bat9000/ >> /tmp/start.log 2>&1'"  . Then I stop the service externally not via monit it sends me alerts as usual but it there is nothing in /tmp folder ? So what else to look into to solve this issue? Where is the monit log stored and how to verify the pidfile? Thank you.


On Tue, Jun 26, 2012 at 2:21 AM, Martin Pala <address@hidden> wrote:

your start script most probably depends on some environment variable, which is not present when it is started via Monit. For security reasons Monit sets sandbox for program execution and sets only spartan PATH variable:


You can log the script output by wrapping it like this:

       start program = "/bin/bash -c '/usr/local/yajswstable/bat9000/ >> /tmp/start.log 2>&1'"

Regarding the application stop - if you stopped the application via monit ("monit stop cvs9000"), then monit won't send alert, as it the stop disables the monitoring as well. If you stopped the application outside of monit control and monit didn't reported the problem, then there is most probably some issue with the configuration - check monit logs, verify the pidfile content.


On Jun 25, 2012, at 5:59 PM, frwa onto wrote:

> Dear All,
>                We are monitoring a java listener say running on port 9000. So far we have set it this way. It just send me the alert when the application is stopped but it never managed to restart it. What must I do to make it restart ? Another thing there was an instance we purposely stopped but never got alerted could it be monit just miss because its was coincident while its was checking and at the same time the programme was stopped.
> check process cvs9000 with pidfile /var/run/ # check your app pid
>  start program  = "/usr/local/yajswstable/bat9000/"
>     stop program  = "/usr/local/yajswstable/bat9000/"
>  if failed port 9000    # if you want to check your app that listen on port 9000
>     then
>     restart
> Regards,
> Frwa.
> --
> To unsubscribe:

To unsubscribe:

reply via email to

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