안녕리눅스 3 User Guide
  • Introduction
  • Chapter 1. 안녕 리눅스 3 \/ CentOS 7.2 차이점
  • Chapter 2. Access Control
    • 안녕 리눅스 방화벽 설정
      • 기본 설정
      • Inbound 제어
      • Outbound 제어
      • brute force attack 제어
      • User defined rule 제어
      • 특정 국가에서의 접속 제어
      • oops-firewall 실행 방법
    • Shell login Control (with PAM)
      • login 가능한 account 제한
      • login account chroot
      • Google OTP를 이용한 2 factor 인증
    • 인증 통합 (Authentification\/Authorization Intergrate)
      • Openldap
        • Master Server 설정
        • SSL 설정
        • Slave Server 설정
        • Replication 설정
        • LDAP 클라이언트 인증 연동 설정
        • LDAP data 관리
        • Sudo LDAP 연동
      • NIS
      • Active Directory
  • Chapter 3. Web control
    • httpd
    • nginx
    • lighttpd
    • PHP
    • Web Access Control
      • Apache 2.4
      • Nginx
      • lighttpd
    • Web Monitor agent
  • Chapter 4. JVM 운영
  • Chapter 5. DNS 운영
    • 기본 설정
    • 신규 도메인 설정
    • Slave DNS 구성
    • Inverse Domain 설정
    • DNSSEC 설정
    • GeoDNS 설정
    • Domain 위임
    • IDN
    • Troble Shooting
  • Chapter 6. Time Server 운영
    • Chrony
    • NTP
  • Chapter 7. VPN 운영
  • Chapter 8. SMTP 운영
  • 안녕 리눅스 White Paper
    • Disk Partition Aligment
  • 안녕 리눅스 알려진 버그
  • 안녕 리눅스 3 패키지 일람
    • [AN:core]
      • annyung-release
      • byspam
      • check-utils
      • genpasswd
      • httpd-conf
      • httpd-krisp
      • httpd-nis
      • httpd-url
      • kmod-geoip
      • l4vip
      • ldap-auth-utils
      • libchardet
      • libimginfo
      • libipcalc
      • libkrisp
      • mariadb-aes256
      • olibc
      • oops-firewall
      • perl-KRISP
      • perl-ModuleList
      • php-chardet
      • php56-chardet
      • php71-chardet
      • php-common
      • php56-common
      • php71-common
      • php-fpm-conf
      • php56-fpm-conf
      • php71-fpm-conf
      • php-geoip
      • php56-geoip
      • php71-geoip
      • php-korean
      • php56-korean
      • php71-korean
      • php-krisp
      • php56-krisp
      • php71-krisp
      • php-nis
      • php56-nis
      • php71-nis
      • php-pear-KSC5601
      • php-pear-ipcalc
      • php-pear-krisp
      • php-pear-oops-key
      • procdump
      • python-chardet
      • python-krisp
      • remount
      • utf8-profile
      • whois
      • yum-annyung
    • [AN:base]
      • apr
      • authconfig
      • bash
      • bind
      • chrony
      • coreutils
      • ctags
      • cvs
      • ecj
      • filesystem
      • GeoIP
      • gperftools
      • httpd
      • initscrtips
      • iptables
      • java-1.8.0-openjdk
      • javapacakges-tools
      • linuxdoc-tools
      • mariadb
      • memcached
      • net-tools
      • ntp
      • openssh
      • openssl
      • pam
      • php
      • procmail
      • procps-ng
      • redhat-rpm-config
      • rootfiles
      • rsyslog
      • sendmail
      • setup
      • shadow-utils
      • sudo
      • systemd
      • sysvinit-tools
      • tomcat
      • traceroute
      • unzip
      • util-linux
      • vim
      • xinted
    • [AN:xless]
    • [AN:addon]
      • authbind
      • cronolog
      • google-authenticator
      • hping3
      • httpd-fcgid
      • imap
      • jfbterm
      • jlint
      • libevent14
      • libnet
      • libnetfilter_acct
      • lighttpd
      • mhash
      • mimetex
      • mm
      • netdata
      • netperf
      • nginx
      • openvpn
      • pdnsd
      • perl-CSS-DOM
      • php-pecl-apcu
      • php56-pecl-apcu
      • php71-pecl-apcu
      • php-pecl-memcache
      • php56-pecl-memcache
      • php71-pecl-memcache
      • php-pecl-oauth
      • php56-pecl-oauth
      • php71-pecl-oauth
      • php-pecl-xdebug
      • php56-pecl-xdebug
      • php71-pecl-xdebug
      • php56
      • php71
      • proftpd
      • python-Mako
      • python-MarkupSafe
      • python-mcrypt
      • python-openpyxl
      • python-xlrd
      • re2c
      • redis
      • rudiments
      • splint
      • sqlite32
      • sqlrelay
      • tomcat-native
    • [AN:plus]
  • 안녕 리눅스 Upgrade Guide
Powered by GitBook
On this page
  • 1. configuration
  • 2. Cronjob
  • 3. logging

Was this helpful?

  1. Chapter 3. Web control

Web Monitor agent

안녕 리눅스의 check-utils package에는 web server를 application level로 모니터링을 할 수 있는 도구가 포함이 되어 있습니다.

1분 마다 cron job으로 체크를 하게 되며, HTTP response code가 200이 아닐 경우, web daemon을 재시작 시킬 수 있습니다.

1. configuration

[root@an3 ~]$ cat /etc/sysconfig/httpd-monitor
# httpd-monitor configuration

# 모니터링 실행 여부
# cronjob 실생시에 이 값이 no이면 그냥 종료함.
execute=no

# 서비스 fail시에 구동할 init file 이름 (기본값 httpd)
# /sbin/srevice ${initfile} [stop|start] 로 사용됨
# 안녕 3에서는 httpd | lighttpd | nginx 중 하나
# 기본값: httpd
initfile=

# 로그 파일 경로
# 기본값: /var/log/httpd/httpwatch.log
logfile=

# connection timeout
# 기본값: 5
ctimeout=

# read timeout
# 기본값: 5
rtimeout=

# 모니터링 주소
# 기본값: $(hostname)
target=

# 접속시 사용할 HTTP/1.1 Host header 값
target_v11=

# 체크할 URI
# 기본값: /robots.txt
uri=

# 서비스 faile시에 apache process의 gdb dump를 뜰지 여부
# AnNyung 3 httpd-conf 패키지의 /usr/sbin/httpd-dump script 필요
# initfile=httpd 일 경우에만 동작함
gdbdump=no
[root@an3 ~]$

2. Cronjob

  • 매 1분 마다 수행하며, execute=yes 일때만 동작 합니다.

  • response code가 200이 아닐 경우, web daemon을 재시작 시킵니다.

[root@an3 ~]$ cat /etc/cron.d/httpd-monitor
# HTTPd protocol checker

* * * * * root /usr/sbin/httpd-monitor >& /dev/null
[root@an3 ~]$

3. logging

[root@an3 ~]$ cat /var/log/httpd/httpwatch.log
[2016.03.05 02:11:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:12:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:13:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:14:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:15:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:16:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:17:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:18:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:19:01] http://localhost/robots.txt "Host: domain.org" return code 200
[2016.03.05 02:20:01] http://localhost/robots.txt "Host: domain.org" return code 200
[root@an3 ~]$
PreviouslighttpdNextChapter 4. JVM 운영

Last updated 5 years ago

Was this helpful?