monit-general
[Top][All Lists]
Advanced

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

Re: Question about check priority


From: Guillaume François
Subject: Re: Question about check priority
Date: Thu, 26 Aug 2021 12:27:57 +0200

Hello, 

According to your configuration, it should be 3 different Monit processes.

Do you see 3 elements while issuing command "monit status" ?

Also the log file should contain more details about what is detected and which actions are performed from monit.

Regards.

Le jeu. 26 août 2021 à 02:48, <hcano@solucoes.net> a écrit :
Hello,

I am using Monit version 5.25.1

My config is:

```
check process unicorn_master_myapp
  with pidfile /var/run/services/unicorn_myapp.pid
  start program = "/bin/bash -c '/services/bin/app_myapp start'"
    as uid deploy and gid deploy
    stop program = "/bin/bash -c '/services/bin/app_myapp stop'"
    as uid deploy and gid deploy
  if mem > 350 MB for 2 cycles then restart
  if cpu > 100% for 2 cycles then restart
  group unicorn_myapp

check process unicorn_myapp_worker0
  with pidfile /var/run/services/unicorn_worker_myapp_0.pid
  if mem > 350.0 MB for 8 cycles then exec "/bin/bash -c '/bin/kill -TERM `cat /var/run/services/unicorn_worker_myapp_0.pid` && sleep 1'"
  group unicorn_myapp

check process unicorn_myapp_worker1
  with pidfile /var/run/services/unicorn_worker_myapp_1.pid
  if mem > 350.0 MB for 8 cycles then exec "/bin/bash -c '/bin/kill -TERM `cat /var/run/services/unicorn_worker_myapp_1.pid` && sleep 1'"
  group unicorn_myapp
```



Unicorn has a master process then each worker has another.

In this case if the master process is above 350MB for 2 cycles it has to be restarted.

Now the workers has a limit of 8 cycles.

My question is:

I am seeing workers being killed after 2 cycles.
Is it intentional as the check on group unicorn_myapp is in some kind overwriting the later ones?

What I may be missing?


Thank You,
Carlos Cano



reply via email to

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