ansible-role-php/templates/monit.j2

14 lines
585 B
Text
Raw Normal View History

2023-06-10 18:30:09 +02:00
# {{ ansible_managed }}
2023-06-10 18:34:23 +02:00
check process php-fpm with pidfile /run/php/php{{ php_version.stdout }}-fpm.pid
2023-06-10 18:30:09 +02:00
group webserver
start program = "/usr/sbin/service php{{ php_version.stdout }}-fpm start"
stop program = "/usr/sbin/service php{{ php_version.stdout }}-fpm stop"
2023-06-10 19:34:28 +02:00
if failed unixsocket /run/php/php{{ php_version.stdout }}-fpm.sock for 3 cycles then restart
2023-06-10 18:30:09 +02:00
if 3 restarts within 5 cycles then timeout
{% if apache2 in ansible_facts.packages %}
check file basedir with path /var/log/apache2/error.log
if match "open_basedir restriction in effect" then alert
{% endif %}