Add monit monitoring
This commit is contained in:
parent
c76e081dc3
commit
6ff025d4b7
4 changed files with 25 additions and 1 deletions
11
templates/monit.conf
Normal file
11
templates/monit.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Ansible managed
|
||||
|
||||
check process apache with pidfile /run/apache2/apache2.pid
|
||||
group webserver
|
||||
start program = "/usr/sbin/service apache2 start" with timeout 60 seconds
|
||||
stop program = "/usr/sbin/service apache2 stop"
|
||||
if cpu > 60% for 2 cycles then alert
|
||||
if cpu > 80% for 5 cycles then restart
|
||||
if totalmem > {{ apache_check_overrides.memory_limit | default(apache_check_memory_limit) }} for 3 cycles then restart
|
||||
if children > 250 then restart
|
||||
if 3 restarts within 5 cycles then timeout
|
Loading…
Add table
Add a link
Reference in a new issue