메뉴 닫기

Haproxy 모니터링 Command

Haproxy 를 이용해서 로드밸랜서를 구성할때 시스템에서 모니터링하는 방법입니다.
3가지 정도 정리해 봤습니다.

 clear counters : clear max statistics counters (add ‘all’ for all counters)
  help           : this message
  prompt         : toggle interactive mode with prompt
  quit           : disconnect
  show info      : report information about the running process
  show stat      : report counters for each proxy and server
  show errors    : report last request and response errors for each proxy
  show sess [id] : report the list of current sessions or dump this session
  get weight     : report a server’s current weight
  set weight     : change a server’s weight
  set timeout    : change a timeout setting
  disable server : set a server in maintenance mode
  enable server  : re-enable a server that was previously in maintenance mode

 

방법1)
※ echo “show stat” | socat unix-connect:${SOCK_FILENAME} stdio
# echo “show stat” | socat unix-connect:sock stdio
haproxy1
 
방법2)
# echo “show info;show stat” | nc -U /var/run/haproxy.sock
 
방법3)
# apt-get install hatop
# hatop -i 3 -s /var/run/haproxy.sock
haproxy3
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x