1168 |
HTTPS. In this example monit will restart apache if it's not |
HTTPS. In this example monit will restart apache if it's not |
1169 |
accepting connections at the portnumbers. The method monit use |
accepting connections at the portnumbers. The method monit use |
1170 |
for a process restart is to first execute the stop-program, wait |
for a process restart is to first execute the stop-program, wait |
1171 |
for 10 seconds (to give the program time to terminate) and then |
for the process to stop and then execute the start-program.</P> |
|
execute the start-program.</P> |
|
1172 |
<PRE> |
<PRE> |
1173 |
check apache with pidfile /var/run/httpd.pid |
check apache with pidfile /var/run/httpd.pid |
1174 |
start program = "/etc/init.d/httpd start" |
start program = "/etc/init.d/httpd start" |
1243 |
will send an alert when the CPU usage of the http daemon and it's |
will send an alert when the CPU usage of the http daemon and it's |
1244 |
child processes raises beyond 60% for over two cycles. It is |
child processes raises beyond 60% for over two cycles. It is |
1245 |
restarted when the CPU usage it over 80% for five cycles, the |
restarted when the CPU usage it over 80% for five cycles, the |
1246 |
memory usage over 100Mb for five cycles or the load average is |
memory usage over 100Mb for five cycles or if the machines load |
1247 |
beyond 10 for 8 cycles:</P> |
average is beyond 10 for 8 cycles:</P> |
1248 |
<PRE> |
<PRE> |
1249 |
check apache with pidfile /var/run/httpd.pid |
check apache with pidfile /var/run/httpd.pid |
1250 |
start program = "/etc/init.d/httpd start" |
start program = "/etc/init.d/httpd start" |
1261 |
stop program = "/etc/init.d/httpd stop" |
stop program = "/etc/init.d/httpd stop" |
1262 |
host www.tildeslash.com port 80 |
host www.tildeslash.com port 80 |
1263 |
checksum /usr/local/apache/bin/httpd |
checksum /usr/local/apache/bin/httpd |
1264 |
alert security@bar on {checksum} |
alert security@bar on {checksum} |
1265 |
|
with mail-format {subject: Alaaarrm! on $HOST} |
1266 |
alert admin@bar on {restart, timeout} |
alert admin@bar on {restart, timeout} |
1267 |
with mail-format { |
with mail-format { |
1268 |
from: bofh@$HOST |
from: bofh@$HOST |