일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- centos 8
- Elasticsearch
- hardening
- ELASTIC
- miniconda
- Proxy
- Kibana server is not ready yet
- XCP-ng
- application security
- PlayBook
- proxycfg
- Kibana
- Windows
- G-suite
- x-pack
- 보안양파
- elastic stack
- bash
- freebsd
- 로그인불가
- xe guest utilities
- pfsense
- 한글가이드
- ssh key 배포
- macos
- GitLab
- endpoint security
- ansible
- docker
- Today
- Total
선 밖에 선 자유인
syslog-ng 로그 서버 설정 예제 본문
- remote syslog-ng 서버 예시
all_log / 호스트별 / 날짜별 로그 저장
- /etc/syslog-ng.conf
--------------------------------------------------------------------------------------------------
source s_sys {
file ("/proc/kmsg" program_override("kernel: "));
unix-stream ("/dev/log");
internal();
# udp(ip(0.0.0.0) port(514));
};
source LOG_ZONE {
udp(ip(0.0.0.0) port(514));
};
destination d_all { file("/LOG/all_log"); };
destination d_host { file("/LOG/hosts/$HOST/$YEAR/$MONTH/$DAY/${FACILITY}.log" create_dirs(yes)); };
destination d_daily { file("/LOG/$YEAR/$MONTH/$DAY/$HOST/${FACILITY}.log" create_dirs(yes)); };
# remote loggin
udp(ip(0.0.0.0) port(514));
};
destination d_all { file("/LOG/all_log"); };
destination d_host { file("/LOG/hosts/$HOST/$YEAR/$MONTH/$DAY/${FACILITY}.log" create_dirs(yes)); };
destination d_daily { file("/LOG/$YEAR/$MONTH/$DAY/$HOST/${FACILITY}.log" create_dirs(yes)); };
# remote logging
log { source(LOG_ZONE); destination(d_all); };
log { source(LOG_ZONE); destination(d_host); };
log { source(LOG_ZONE); destination(d_daily); };
-------------------------------------------------------------------------------------------------