Skip to content

Commit 298809a

Browse files
committed
Send alert rather than restart apache.
1 parent 7bc75c5 commit 298809a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

129 - monit.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -201,21 +201,21 @@ EOT
201201
function monit_def_apache {
202202
cat <<EOT >/etc/monit/conf.d/apache2.cfg
203203
check process apache with pidfile /var/run/apache2.pid
204-
start program = "/etc/init.d/apache2 start" with timeout 30 seconds
204+
start program = "/etc/init.d/apache2 start"
205205
stop program = "/etc/init.d/apache2 stop"
206206
if cpu > 60% for 2 cycles then alert
207207
if cpu > 80% for 5 cycles then alert
208208
if totalmem > 200.0 MB for 5 cycles then alert
209209
if children > 250 then alert
210210
if loadavg(5min) greater than 10 for 8 cycles then stop
211-
if failed host localhost port 80 protocol HTTP request / within 2 cycles then restart
211+
if failed host localhost port 80 protocol HTTP request / within 2 cycles then alert
212212
if failed host localhost port 80 protocol apache-status
213213
dnslimit > 25% or loglimit > 80% or waitlimit < 20% retry 2 within 2 cycles then alert
214-
if 5 restarts within 5 cycles then timeout
214+
#if 5 restarts within 5 cycles then timeout
215215
depends on apache_bin
216216
depends on apache_rc
217217
group www
218-
218+
219219
check file apache_bin with path /usr/sbin/apache2
220220
if failed checksum then unmonitor
221221
if failed permission 755 then unmonitor

0 commit comments

Comments
 (0)