Created
June 4, 2017 19:07
-
-
Save mario21ic/796e474bfede7cf00b0a0ec0b5ccc001 to your computer and use it in GitHub Desktop.
Monit files to configuration: apache, httpd, nginx, mysql and sshd
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 apache with pidfile /run/apache2.pid | |
start program = "/etc/init.d/apache2 start" with timeout 60 seconds | |
stop program = "/etc/init.d/apache2 stop" |
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 httpd with pidfile /var/run/httpd.pid | |
group apache | |
start program = "/etc/init.d/httpd start" | |
stop program = "/etc/init.d/httpd stop" | |
if failed host 127.0.0.1 port 80 | |
protocol http then restart | |
if 5 restarts within 5 cycles then timeout |
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 mysqld with pidfile /var/run/mysqld/mysqld.pid | |
group mysql | |
start program = "/etc/init.d/mysqld start" | |
stop program = "/etc/init.d/mysqld stop" | |
if failed host 127.0.0.1 port 3306 then restart | |
if 5 restarts within 5 cycles then timeout |
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 | |
start program = "/etc/init.d/nginx start" | |
stop program = "/etc/init.d/nginx stop" |
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 sshd with pidfile /var/run/sshd.pid | |
start program "/etc/init.d/sshd start" | |
stop program "/etc/init.d/sshd stop" | |
if failed host 127.0.0.1 port 22 protocol ssh then restart | |
if 5 restarts within 5 cycles then timeout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment