configuration-templates
/monit/debian/templates/varnishd/varnish |
@@ -2,15 +2,15 @@ |
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ## |
########################################################################### |
|
check process varnish with pidfile /var/run/varnishd.pid |
check process varnishd matching varnishd |
start program = "/etc/init.d/varnish start" |
stop program = "/etc/init.d/varnish stop" |
if cpu > 60% for 2 cycles then alert |
if cpu > 80% for 5 cycles then restart |
if totalmem > 200.0 MB for 5 cycles then restart |
if children > 250 then restart |
if loadavg(5min) greater than 10 for 8 cycles then stop |
#if cpu > 60% for 2 cycles then alert |
#if cpu > 80% for 5 cycles then restart |
#if totalmem > 512 MB for 5 cycles then restart |
#if children > 250 then restart |
#if loadavg(5min) greater than 10 for 8 cycles then stop |
# set to ip and port of varnish |
if failed host 127.0.0.1 port 80 protocol http then restart |
#if failed host 127.0.0.1 port 80 protocol tcp then restart |
# enable only if you wish monit to stop trying to restart |
# if 3 restarts within 5 cycles then timeout |