웹베이스 모니터링 도구입니다..

다운로드 : http://mmonit.com/monit/dist/monit-5.0.3.tar.gz

메뉴얼 :  http://mmonit.com/monit/documentation/monit.html

데몬별로 상태를 확인해서 특정 조건에 도달할경우 명령수행이 가능합니다..

아래 설정은 웹서버를 예로든것입니다..

메모리사용 3072M, childen 500, CPU 95%, port Fail

위 사항이 체크돼면 재시작입니다..

start, stop 스크립트를 만들면 프로세스 정보나 접근기록을 기록할수 있을듯 하네요..

set daemon 120 # Poll at 2-minute intervals
set mailserver 모니터메일서버주소
set logfile syslog facility log_daemon
set alert email
set httpd port 3000 and use address 도메인주소
    allow localhost
    allow 허용할아이피대역
    allow 관리자아이디:비밀번호

check system domain.tld
    if loadavg (1min) > 4 then alert
    if loadavg (5min) > 2 then alert
    if memory usage > 75% then alert
    if cpu usage (user) > 70% then alert
    if cpu usage (system) > 30% then alert
    if cpu usage (wait) > 20% then alert

check process apache
    with pidfile "/usr/www/apache2/logs/httpd.pid"
    start program = "/usr/www/apache2/bin/apachectl startssl" with timeout 60 seconds
    stop program = "/usr/www/apache2/bin/apachectl stop"
    if 2 restarts within 3 cycles then timeout
    if totalmem > 3072 Mb then alert
    if children > 500 for 5 cycles then stop
    if cpu usage > 95% for 3 cycles then restart
    if failed port 80 protocol http then restart
    group server
    depends on httpd.conf, httpd.bin

check file httpd.conf
    with path /usr/www/apache2/conf/httpd.conf
    if changed checksum
        then exec "/usr/www/apache2/bin/apachectl graceful"

check file httpd.bin
    with path /usr/www/apache2/bin/httpd
2009/08/10 12:29 2009/08/10 12:29

Trackback Address :: https://youngsam.net/trackback/699