Notes for systems administration of Akara deployments
Monitoring Akara instances with monit
You can use a tool such as monit to monitor akara for availability, excessive load, etc.. It can take actions such as stopping, restarting and/or alerting you to various problem conditions of your choosing.
Here's an example monitoring "service" section from /etc/monit/monitrc using version 5.0.3;
check process akara with pidfile /home/mbaker/.local/lib/akara/logs/akara.pid
start program = "/home/mbaker/.local/bin/akara start" with timeout 60 seconds
stop program = "/home/mbaker/.local/bin/akara stop"
if cpu > 80% for 5 cycles then restart
if totalmem > 200.0 MB for 5 cycles then restart
if children > 50 then restart
if loadavg(5min) greater than 10 for 8 cycles then stop
if failed host localhost port 8880 protocol http
and request "/"
then restart
if 3 restarts within 5 cycles then timeout