본문 바로가기
server/Cent_os

httpry를 이용한 All HTTP Requests Monitor툴

 

- http 를 서비스 중인 서버라면 장애 처리및 모니터링을 위해 패킷을 샘플링 하여, wireshark ,tshark 같은 툴을 이용한다.
- 하지만 아래 그림 처럼 http에 관련 된 정보라 하더라도, 사람이 보기 힘들고 모니터링하기 힘든 부분이 있다.


 

- httpry 이용하여 http 에 대한 정보를 좀더 쉽게 모니터링 할 수 있다.
- 아래와 같이 httpry를 설치 한다

[root@NODE2 ~]#  yum install httpry -y



- 설치 완료후 해당 서비스를 하고 있는 인터페이스 실행 한다.
[root@NODE2 ~]# httpry -i eth1

- 외부에서 curl 로 테스트 해본다.
[root@NODE0 src]# curl http://192.168.229.136
- 아래와 같은 한 세션에 대한 정보를 확인 할 수 있다.


- 아래와 같이 curl 로 연결시 해더에 호스트 정보를 추가후 확인하면 어떤 호스트로 요청을 했는지 확인이 가능하다.
[root@NODE0 src]# curl http://192.168.229.136 -H"HOST: naver.com"

 

-  추가적인 옵션  


Usage: httpry [ -dFhpqs ] [-b file ] [ -f format ] [ -i device ] [ -l threshold ]
              [ -m methods ] [ -n count ] [ -o file ] [ -P file ] [ -r file ]
              [ -t seconds] [ -u user ] [ 'expression' ]
   -b file      write HTTP packets to a binary dump file
   -d           run as daemon
   -f format    specify output format string
   -F           force output flush
   -h           print this help information
   -i device    listen on this interface
   -l threshold specify a rps threshold for rate statistics
   -m methods   specify request methods to parse
   -n count     set number of HTTP packets to parse
   -o file      write output to a file
   -p           disable promiscuous mode
   -P file      use custom PID filename when running in daemon mode
   -q           suppress non-critical output
   -r file      read packets from input file
   -s           run in HTTP requests per second mode
   -t seconds   specify the display interval for rate statistics
   -u user      set process owner
   expression   specify a bpf-style capture filter

 

반응형