ansible-role-php/templates/monit.j2
2023-06-10 23:45:48 +02:00

13 lines
587 B
Django/Jinja

# {{ ansible_managed }}
check process php-fpm with pidfile /run/php/php{{ php_version.stdout }}-fpm.pid
group webserver
start program = "/usr/sbin/service php{{ php_version.stdout }}-fpm start"
stop program = "/usr/sbin/service php{{ php_version.stdout }}-fpm stop"
if failed unixsocket /run/php/php{{ php_version.stdout }}-fpm.sock for 3 cycles then restart
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 %}