Hello Markus,
the restart depends to your definition.

> Here the definition of the base service others depend on it
> CHECK PROCESS mqm_TBCOM MATCHING "^/opt/mqm/bin/amqzxma0 -m TBCOM -u mqm$"
>     START   = "/bin/bash -c '. /u01/app/bcom/settings/bash_profile; 
> /bin/strmqm TBCOM'" UID mqm GID mqm
>     STOP    = "/bin/bash -c '. /u01/app/bcom/settings/bash_profile; 
> /bin/endmqm -i TBCOM'" UID mqm GID mqm
>     RESTART = "/bin/bash -c '. /u01/app/bcom/settings/bash_profile; 
> /opt/mqm/bin/endmqm -p TBCOM; /opt/mqm> /bin/strmqm TBCOM'" UID mqm GID mqm
>     IF NOT EXIST THEN RESTART
>     IF NOT EXIST THEN EXEC "/u01/app/bcom/monit/logger.sh CRITICAL"
>     IF 2 RESTARTS WITHIN 5 CYCLES THEN UNMONITOR
>     IF 2 RESTARTS WITHIN 5 CYCLES THEN EXEC "/u01/app/bcom/monit/logger.sh 
> FATAL"
> 
> The log shows that the RESTART method gets called.
> [CEST Aug 14 22:07:14] error    : 'mqm_TBCOM' process is not running
> ...
> 
> For all other services which are dependent of the base service monit 
> correctly calls the START method.
> Any ideas why this happens?

As long as a "restart" command is available and "if not exist then" use
"restart", the restart command will called if the service does not exists.
I prefer "if not exist for 3 cycles then start" to start an application.
The short delay of "3 cycles" is useful to prevent some tcp/ip problems.

With regards,
I check my monit logs tomorrow,
Lutz

Reply via email to