로그 서버 구축중입니다.
작성자 정보
- 까망성 작성
- 작성일
컨텐츠 정보
- 2,666 조회
- 1 댓글
- 0 추천
- 목록
본문
OS: Linux centos
Apache 사용중입니다.
원격으로 로그를 넘기려 하는데 syslog의 기능이 너무 적은듯하여 syslog-ng 로 갈아 타게 되었습니다.
원격으로 일반 messages등의 로그는 옮기는게 잘 됩니다만..
여기서 질문좀 하겠습니다.
web로그를 원격으로 저장할 경우
syslog-ng 인경우 filter
syslog인경우 local4.* 머 이런식이겠구요..
문제는 filter 부분에 사용자가 임의로 정할 수 있는 규칙은 local0~7로 알고 있습니다만. 그외의 방법은 없는건지요..?
서버 한대에 버추얼 호스트가 여러대가 물려있다 보니 access,error log 두개만 보내도 일단 local0~1은 먹고들어가는 셈이니.. 총 서버당 4개밖에 사용을 할수가 없네요.. 적은 서버야 가능하지만.. 그게아닌이상..
한서버에 8~10개 잇는경우.. 당췌 답이 보이지 않습니다..
ex) abc.co.kr --> access_log --> local0
abc.co.kr --> errorlog --> local1
. . . . . . . . . . . . . . . . . . . .
Total : 버추얼호스트당 2개씩 : 8/2 -> 4개 ..
포트를 변경을 해보았지만 포트를 여러개 열고 나서는 되지도 않구있구요..
임의로 local0~7외에 다른 지정을 할 수 있는 방법이 있을런지요..?
아니면 다른 방법으로 웹로그를 수집 할 수 있다면 조언 부탁드립니다.. 몇일째 삽질중이네요 ㅠㅠ
참고로 현재 설정입니다.
## 웹서버 구성. ##
source s_sys { unix-stream ("/dev/log"); internal(); };
destination d_s_a { udp("목적지ip" port(560)); };
destination d_s_e { udp("목적지ip" port(560)); };
filter f_f1 { (facility(local1) and level(info)); };
filter f_f2 { (facility(local2) and level(info)); };
log { source(s_sys); filter(f_f1); destination(d_s_a); };
log { source(s_sys); filter(f_f2); destination(d_s_b); };
## 로그서버구성 ##
source S_d1{ internal(); udp(port(560)); };
filter f_suk_a { facility(local1) and level(info); };
filter f_suk_e { facility(local1) and level(info); };
destination D_d1_a { file("/home/log/test.access_log"); };
destination D_d1_e { file("/home/log/test.error_log"); };
log { source(S_d1); filter(f_suk_a); destination(D_d1_a); };
log { source(S_d1); filter(f_suk_e); destination(D_d1_e); };
관련자료
-
이전
-
다음
눈여울님의 댓글
- 눈여울
- 작성일