## Nginx

#check process nginx with pidfile /var/run/nginx.pid
#start program = "/usr/bin/systemctl start nginx"
#stop program = "/usr/bin/systemctl stop nginx"
#mode active
#if children > 250 then restart
#if loadavg(5min) greater than 10 for 8 cycles then restart
#if 3 restarts within 5 cycles then timeout

## Apache

#check process httpd with pidfile /etc/httpd/run/httpd.pid
#start program = "/usr/bin/systemctl start httpd"
#stop program = "/usr/bin/systemctl stop httpd"
#if failed host 127.0.0.1 port 80 protocol http
# and request "/monit.html"
# then restart
#if 3 restarts within 5 cycles then timeout


## PHP-FPM

#check process php-fpm.www with pidfile /var/run/php-fpm/php-fpm.pid
#start program = "/usr/bin/systemctl start php-fpm"
#stop program  = "/usr/bin/systemctl stop php-fpm"
#if failed host localhost port 80 protocol http
# and request '/ping'
# with timeout 20 seconds for 5 cycles
# then restart
#if 3 restarts within 5 cycles then timeout
#depends on nginx


## MariaDB

#check process mysqld with pidfile /var/run/mariadb/mariadb.pid
#start program = "/usr/bin/systemctl start mariadb"
#stop program = "/usr/bin/systemctl stop mariadb"
#mode active
#if failed host 127.0.0.1 port 3306 then restart
#if 5 restarts within 5 cycles then timeout


## Memcached
## See: https://bugs.centos.org/view.php?id=9570

#check process memcached with pidfile /var/run/memcached/memcached.pid
#start program = "/usr/bin/systemctl start memcached"
#stop program = "/usr/bin/systemctl stop memcached"
#if failed host 127.0.0.1 port 11211 protocol MEMCACHE then restart
#if cpu > 90% for 5 cycles then restart
#if 3 restarts within 3 cycles then timeout