Skip to content

Instantly share code, notes, and snippets.

@jgeiger
Created August 13, 2014 21:29
Show Gist options
  • Save jgeiger/5c676fd9d449138143eb to your computer and use it in GitHub Desktop.
Save jgeiger/5c676fd9d449138143eb to your computer and use it in GitHub Desktop.
Nginx monit conf file
# nginx
check process nginx with pidfile /usr/local/nginx/logs/nginx.pid
start program = "/sbin/start nginx"
stop program = "/sbin/stop nginx"
if failed host 127.0.0.1 port 80 then restart
if cpu is greater than 40% for 2 cycles then alert
if cpu > 60% for 5 cycles then restart
if 10 restarts within 10 cycles then timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment