Server-Side/Linux2010. 12. 20. 20:19
Add Dag RPM Repository
# vi /etc/yum.repos.d/Dag.repo
-----------------------------------
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=0
enabled=1
protetc=0
-----------------------------------

Install & configure monit
# yum install monit
# vi /etc/monit.conf
-----------------------------------
set daemon 120
set logfile syslog facility log_daemon
set idfile /var/monit/id
set statefile /var/monit/state

set mailserver localhost
set alert your@email.com

set httpd port 80 and
     use address localhost
     allow localhost

check process apache with pidfile /usr/local/apache/logs/httpd.pid
    start program = "/etc/init.d/httpd start" with timeout 60 seconds
    stop program = "/etc/init.d/httpd stop"
    if cpu > 60% for 2 cycles then alert
    if cpu > 80% for 5 cycles then restart
    if totalmem > 200.0 MB for 5 cycles then restart
    if children > 250 then restart
    if loadavg(5min)greater than 10 for 8 cycles then stop
-----------------------------------

start monit
# service monit start




Posted by 준피