Last active
April 22, 2020 17:20
-
-
Save eksiscloud/930bd74b5df8d4e566d380294e956dd5 to your computer and use it in GitHub Desktop.
Monit: Apache2 (backend of Varnish)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Apache2 | |
check process apache with pidfile /var/run/apache2/apache2.pid | |
group www | |
start program = "/usr/sbin/service apache2 start" | |
stop program = "/usr/sbin/service apache2 stop" | |
if cpu is greater than 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if totalmem > 2 GB for 5 cycles then restart | |
if children > 250 then restart | |
if 3 restarts within 5 cycles then timeout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This follows only cpu and totalmem. Webserver itself is monitored by sites. If Apache2 falls, every site will fall too.