Skip to content

Commit ba97f42

Browse files
committed
Addition of templates
1 parent 6f68349 commit ba97f42

File tree

6 files changed

+50
-0
lines changed

6 files changed

+50
-0
lines changed

templates/httpd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# {{ template_destpath }}
2+
# {{ ansible_managed }}
3+
4+
check process apache with pidfile /var/run/httpd/httpd.pid
5+
group root
6+
start program = "/bin/systemctl start httpd"
7+
stop program = "/bin/systemctl stop httpd"
8+
if failed port 8080 for 2 cycles then restart
9+
if failed port 8443 for 2 cycles then restart

templates/mariadb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# {{ template_destpath }}
2+
# {{ ansible_managed }}
3+
4+
check process mariadb with pidfile /var/run/mariadb/mariadb.pid
5+
group mysql
6+
start program = "/bin/systemctl start mariadb"
7+
stop program = "/bin/systemctl stop mariadb"
8+
if failed port 3306 protocol mysql timeout 15 seconds then restart

templates/monitrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set daemon 30 # check services at 30 seconds intervals
2+
set log /var/log/monit.log
3+
set eventqueue
4+
basedir /var/monit # set the base directory where events will be stored
5+
slots 100 # optionally limit the queue size
6+
set httpd port 11000 and
7+
use address localhost # only accept connection from localhost (drop if you use M/Monit)
8+
allow localhost # allow localhost to connect to the server

templates/nginx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# {{ template_destpath }}
2+
# {{ ansible_managed }}
3+
4+
check process nginx with pidfile /var/run/nginx.pid
5+
group nginx
6+
start program = "/bin/systemctl start nginx"
7+
stop program = "/bin/systemctl start nginx"
8+
if failed port 80 for 2 cycles then restart
9+
if failed port 443 for 2 cycles then restart

templates/php-fpm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# {{ template_destpath }}
2+
# {{ ansible_managed }}
3+
4+
check process php-fpm with pidfile /run/php-fpm/php-fpm.pid
5+
group root
6+
start program = "/bin/systemctl start php-fpm"
7+
stop program = "/bin/systemctl stop php-fpm"
8+
if failed unixsocket /var/run/php-fpm/wordpress.sock for 2 cycles then restart

templates/redis

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# {{ template_destpath }}
2+
# {{ ansible_managed }}
3+
4+
check process redis with pidfile /var/run/redis/redis.pid
5+
group redis
6+
start program = "/bin/systemctl start redis"
7+
stop program = "/bin/systemctl stop redis"
8+
if failed port 6379 protocol redis then restart

0 commit comments

Comments
 (0)