Created
April 22, 2020 16:41
-
-
Save eksiscloud/7d7b16ad6d94fa389b5fc5e0db70f5e7 to your computer and use it in GitHub Desktop.
Monit: Nginx
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
check process nginx with pidfile /var/run/nginx.pid | |
group www | |
group nginx | |
start program = "/etc/init.d/nginx start" | |
stop program = "/etc/init.d/nginx stop" | |
# if failed port 80 protocol http request "/" then restart ; I'm redirecting to 443 in Nginx, so no need to monitor | |
if 5 restarts with 5 cycles then timeout | |
depend nginx_bin | |
depend nginx_rc | |
check file nginx_bin with path /usr/sbin/nginx | |
group nginx | |
include /etc/monit/templates/rootbin | |
check file nginx_rc with path /etc/init.d/nginx | |
group nginx | |
include /etc/monit/templates/rootbin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment