You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
set daemon 20 # TIMEOUT 20 Secondsset logfile syslog facility log_daemon # LOGGINGset mailserver smtp.gmail.com port 587
username "[email protected]" password "password"
using tlsv1
with timeout 30 seconds
check system domain.tld
if loadavg (1min) > 4 then alert
if loadavg (5min) > 3 then alert
if memory usage > 75% then alert
if cpu usage (user) > 68% then alert
if cpu usage (system) > 30% then alert
if cpu usage (wait) > 20% then alert
Nginx
check process nginx with pidfile /var/run/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"if failed port 80 protocol http for 2 cycles then restart
if mem usage > 80% for 5 cycles then restart
Laravel Artisan Command
check process queue
matching "queue:work"
start = "/bin/bash -c 'cd /var/www/p2tk-crm && /usr/bin/php artisan queue:work --daemon &'"if does not exist then start
MySQL
check process mysql
matching "mysqld"
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"if does not exist then start
PHP-FPM
check process php-fpm with pidfile /var/run/php-fpm/php-fpm.pid
start program = "/etc/init.d/php-fpm start"
stop program = "/etc/init.d/php-fpm stop"if mem usage > 80% for 5 cycles then restart