Monit

Aus crazylinux.de
Zur Navigation springen Zur Suche springen

Easy, proactive monitoring of processes, programs, files, directories, filesystems and hosts

https://mmonit.com/monit/

#/etc/monit/monitrc

set mailserver localhost
set alert adminuser@server.tld

check process apache2 with pidfile /var/run/apache2.pid
start program = "/etc/init.d/apache2 start" with timeout 60 seconds
stop program = "/etc/init.d/apache2 stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if failed host server.tld port 443 type tcpssl protocol http
   with timeout 15 seconds
   then restart
if totalmem > 1000.0 MB for 5 cycles then restart
if children > 80 then restart
if loadavg(5min) greater than 10 for 8 cycles then restart