monit

monitでslack通知

https://www.jverdeyen.be/devops/monit-slack-notifications/ execでshellscriptからslack通知する

monitで1時間アクセスがないサービスを停止する

/etc/monit.d/service_passivate.conf check file service_passivate with path /var/log/nginx/access.log if timestamp > 30 minutes for 30 cycles then exec "/root/bin/service_passivate.sh"execはalert違って、条件を満たしている場合常に実行される…