Hello. I used to use monit to save my life while my server kept crashing,
and am now seeing something similar on another host. I wonder if anyone
might be kind enough to comment on my configrc as I'm getting too many
alerts and I'm not sure if I set it right.
check file apache_bin with path
/dh/apache2/apache2-ps18939/apache2-ps18939-httpd
# if failed checksum and
# expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
alert [email protected] on {
permission, uid, gid
} with the mail-format { subject: Alarm! }
group server
check process apache with pidfile /var/run/apache2-ps18939-httpd.pid
start program = "/etc/init.d/httpd2 start" with timeout 60 seconds
stop program = "/etc/init.d/httpd2 stop"
# if cpu > 60% for 2 cycles then alert
# if cpu > 80% for 5 cycles then restart
if totalmem > 400.0 MB for 5 cycles then restart
if children > 250 then restart
# if loadavg(5min) greater than 10 for 8 cycles then stop
if failed host sussexheights.org port 80 protocol http
and request "/wp/index.php"
then restart
# if failed port 443 type tcpssl protocol http
# with timeout 15 seconds
# then restart
if 3 restarts within 5 cycles then timeout
depends on apache_bin
group server
#
Process status
*Parameter**Value* Name apache Pid file/var/run/apache2-ps18939-httpd.pid
Status running Groupserver Monitoring mode active Monitoring
statusmonitored Depends
on service apache_bin Start program '/etc/init.d/httpd2 start' timeout 60
second(s) Stop program'/etc/init.d/httpd2 stop' timeout 30 second(s) Check
service every 1 cycle TimeoutIf restarted 3 times within 5 cycle(s) then
unmonitor Data collected Mon May 24 10:51:08 2010 Port Response time0.240s
to sussexheights.org:80/wp/index.php [HTTP via TCP] Process id7843 Parent
process id 1 Process uptime1m CPU usage 0.0% Memory usage10.8% [33364kB]
Children 5 Total CPU usage (incl. children)0.2% Total memory usage (incl.
children) 36.3% [111736kB] PortIf failed
sussexheights.org:80/wp/index.php[HTTP via TCP] with timeout 5 seconds
1 times within 1 cycle(s) then restart
else if succeeded 1 times within 1 cycle(s) then alert PidIf changed 1 times
within 1 cycle(s) then alert Ppid If changed 1 times within 1 cycle(s) then
alert ChildrenIf greater than 250 1 times within 1 cycle(s) then restart
else if succeeded 1 times within 1 cycle(s) then alert Memory amount limit
(incl. children)If greater than 409601 5 times within 5 cycle(s) then
restart else if succeeded 1 times within 1 cycle(s) then alert
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general