summaryrefslogtreecommitdiff
path: root/monit/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'monit/nginx.conf')
-rw-r--r--monit/nginx.conf9
1 files changed, 9 insertions, 0 deletions
diff --git a/monit/nginx.conf b/monit/nginx.conf
new file mode 100644
index 0000000..c194f9a
--- /dev/null
+++ b/monit/nginx.conf
@@ -0,0 +1,9 @@
+check process nginx with pidfile /var/run/nginx.pid
+ group www-data
+ start program = "/etc/init.d/nginx start"
+ stop program = "/etc/init.d/nginx stop"
+ if children > 250 then restart
+ if loadavg(5min) greater than 2 for 8 cycles then stop
+ if failed host localhost port 80 type tcp protocol http for 3 times within 5 cycles then alert
+ if 3 restarts within 5 cycles then alert
+ if 5 restarts within 5 cycles then timeout