본문 바로가기

리눅스43

apache access 로그 syslog로 보내기 여러대의 web 서버를 운영할경우 syslog의 remote syslog 로 관리 하는 것도 하나의 운영방법이 될수 있다. applicaton 로그를 중앙으로 수집하는 여러방법이 있지만, 그중에 syslog로 한번 설정 해보자. (전에는 syslog-ng 라는 데몬을 이용해서, 로그관리 중앙서버로 수집한 경우가 있다. 근데.. fluentd,logstash등 오픈소스가 많아서.. 굳이..) 1) apache access 로그에 설정을 추가하기 # 아래라인을 추가한다. CustomLog "|/usr/bin/logger -p local1.notice -t apache" combined # 기존에 있던 로그설정은 그대로 둔다. CustomLog "|/webserver/program/apache/bin/rota.. 2015. 12. 3.
ntop은 네트워크에서 관련된 호스트들과의 관계를 네트워크 트래픽을 통해 모니터링하는 공개 소프트웨어 ntop은 네트워크에서 관련된 호스트들과의 관계를 네트워크 트래픽을 통해 모니터링하는 공개 소프트웨어이다.(http://www.ntop.org/)ntop shows thecurrent network usage. It displays a list of hosts that are currently using the network and reports information concerning the IP (Internet Protocol) and Fibre Channel (FC) traffic generated by each host. The traffic is sorted according to host and protocol.http://www.ntop.org/products/ntop/ntopng소개 :n.. 2015. 12. 3.
linux multitail : 로그 모니터링 할때 good multitail. tail 이라는 command를 이용해서, 로그들을 모니터링 한다. *BSD 계열과 리눅스에는 디폴트 라이브러리다. tgz를 이용해 설치 할수 있고, yum으로도 설치 할수 있다. ( # yum install -y multitail ) 특징은 tail 로 여러개 로그 파일을 오픈해서 볼수도 있지만, multitail의 장점은 command의 결과도 함께 볼수 있다는거다!!! ( 우와 ) 예를 들어 web서버를 운영하고 있고, access 로그나 error 로그 + netstat 명령어를 통해서 특정 status를 함께 모니터링 하려는 경우. 완전 나이스 하다. - 옵션 -l command : Command to execute in a window. Parameter is the com.. 2015. 12. 3.
curl로 http status code만 뽑기 특정 주소를 health-check해서 200코드가 아닌 경우 알림을 준다거나.. 뭐 그럴때? curl -I http://www.nate.com 2>/dev/null | head -n 1 | cut -d$' ' -f2 2015. 12. 3.