4,493,342 th visitor since 2017.2.1 ( Today : 1994 )
Computer ???
No. 488
Name. swindler
Subject. HAProxy 로그 설정
Main Cate. Linux
Sub Cate.
Date. 2017-12-27 14:27
Hit. 2714 (125.131.199.20)
File.
HAProxy 1.8.1 기준
centos 7

HAProxy는 rsyslog로 남기기 때문에 다음과 같이 설정해야 함.

/etc/rsyslog.d/haproxy.conf
-----------------------------
$ModLoad imudp
$UDPServerRun 514
$template HAproxy,"%msg%\n"
local2.=info -/var/log/haproxy.log
local2.notice -/var/log/haproxy-status.log
local2.* ~
-----------------------------


그리고
/etc/haproxy/haproxy.cfg 에 아래와 같이 추가함

global 영역에
log 127.0.0.1 local2 info

frontend 영역에
log global
option httplog



rsyslog와 haproxy를 재시작하면 로그가 쌓인다.
logrotate 설정도 필요하다.


[바로가기 링크] : http://coolx.net/cboard/computer/488



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog