monit-general
[Top][All Lists]
Advanced

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

Re: [EXTERNAL] Restart apps based on total system CPU usage


From: Lutz Mader
Subject: Re: [EXTERNAL] Restart apps based on total system CPU usage
Date: Thu, 18 Feb 2021 20:33:52 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello Mike,
if the application is known you should look to the samples too.

>> But you can check a specific application also, see
>> https://mmonit.com/monit/documentation/monit.html#CONFIGURATION-EXAMPLES

Based on the following sample (from Configuration Samples)

> check process apache with pidfile /var/run/httpd.pid
>       start program = "/etc/init.d/httpd start"
>       stop program  = "/etc/init.d/httpd stop"
>       if cpu > 40% for 2 cycles then alert
>       if total cpu > 60% for 2 cycles then alert
>       if total cpu > 80% for 5 cycles then restart
>       if mem > 100 MB for 5 cycles then stop

you can define resource limits for each service.

With regards,
Lutz



reply via email to

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