P0-1+P2-1+P2-3: 修 OTel traces pipeline + DROP LangBot 表 + nginx logrotate + cron

This commit is contained in:
SeniorDev committed 2026-08-10 14:31:44 +08:00
1 parent 56eb9f1634
commit bc96a087dd
1 file changed
+36
+36
View File
@@ -0,0 +1,36 @@
# 七虎平台 logrotate 配置
# 2026-08-10 — P2-3 (体检报告 #2.3 nginx access.log 6.3GB)
# 容器内只管 nginx log;auth.log 由宿主 rsyslog 管理
# nginx access.log: 每日滚动 + 保留 14 天 + 压缩
/var/log/nginx/access.log {
daily
rotate 14
compress
delaycompress
missingok
notifempty
create 0640 www-data adm
sharedscripts
postrotate
[ -f /var/run/nginx.pid ] && kill -USR1 $(cat /var/run/nginx.pid) || true
endscript
}
# nginx error.log: 每日滚动 + 保留 7 天
/var/log/nginx/error.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
create 0640 www-data adm
sharedscripts
postrotate
[ -f /var/run/nginx.pid ] && kill -USR1 $(cat /var/run/nginx.pid) || true
endscript
}
# auth.log 由宿主 rsyslog 自管(容器无 rsyslogd,无 syslog user)
# 如需在容器内管,需先 apt-get install -y rsyslog