Monit does restart action - this will call stop->start. The stop
method allows to cleanup the environment after the process crashed,
which may be necessary in some cases.
When monit calls start method, it checks whether the process is
running. In your case the start script in "stop program" started the
service already. When the "start program" was called, it checked
whether the process is running and since it was running, the start
method retuned as there was no action needed.
The web interface allows manual control for the services - the user
is responsible for his own action (if you request monit to call just
"start" method, it will do it). The restart is monit's reaction to
given event (process disappeared) which consists of stop&start.
Martin
On Dec 7, 2007, at 10:49 PM, Teresa Havel wrote:
So when monit detects a process not running, it uses a "restart"
and not just a "start" for its method of automatically starting the
process?
I see by the browser interface, a person has the option of using a
"start" or "restart". So when I manually used the "start" button it
worked, but monit could not automatically start is because it uses
"restart".
It is strange that since I am now using my start script as a dummy
in the stop method, that I don't have the processes being started
twice. But I will use the dummy stop method you suggested just to
be safe.
Martin Pala wrote:
Monit restart action requires the stop method, since it calls the
stop method first and then start. You can add dummy method like:
stop program = "/bin/true"
Martin
Teresa Havel wrote:
I did check the logs and it did show the error when the process
was not running. Then in the next line it would say:
monit: Start or stop method not defined -- process tcpaprscvt
It would not start automatically. But it would work when I used
the start service button on the browser interface. Based on the
log message, I began to wonder if monit needed to have a stop
method present in monitrc, even though it only needed to run the
start method. I added a stop method, which was just the same
method that I used in start, because I figured it wasn't going to
have to use it anyway, it only uses the stop method if you select
stop or restart. After I did that, it began to work properly,
automatically starting the process when it determined it had
stopped. I belileve that solves my problem for now. Thanks for
the suggestions.
Martin Pala wrote:
You can run monit in verbose mode with -v options and check the
monit logs. When the file is not available, then monit should
report error.
You can also check the system logs and/or mnttab using monit's
content test and check remote services using tcp/udp tests. You
can also use hint no. 13 from monit's FAQ: http://
www.tildeslash.com/monit/doc/faq.php
Martin
Leng Siakkhasone wrote:
I have a mail server that mount nfs mounts from a file server.
I would like to be notified if/when the file server is
unreachable by the mail server. I tried using a token file with
the following:
# /homes/home01 is the nfs mount
check file home01 with path /homes/home01/monit.token
group hyper
But that did not work. 'monit summary' still showed it as
accessible even though the file server was offline.
I would appreciate any suggestions and/or strategies for
monitoring an nfs mount. Thanks.
-leng
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-
general<teresa_m_havel.vcf>
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general