[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Script help
From: |
Martin Pala |
Subject: |
Re: Script help |
Date: |
Mon, 25 Jun 2012 20:21:03 +0200 |
Hello,
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:
PATH=/bin:/usr/bin:/sbin:/usr/sbin
You can log the script output by wrapping it like this:
start program = "/bin/bash -c
'/usr/local/yajswstable/bat9000/startDaemon.sh >> /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.
Regards,
Martin
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/wrapper.cvs9000.pid # check your
> app pid
> start program = "/usr/local/yajswstable/bat9000/startDaemon.sh"
> stop program = "/usr/local/yajswstable/bat9000/stopDaemon.sh"
> if failed port 9000 # if you want to check your app that listen on port
> 9000
> then
> restart
>
> Regards,
> Frwa.
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
- Script help, frwa onto, 2012/06/25
- Re: Script help,
Martin Pala <=