New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
增加定时清理 log 日志(急) #1271
Comments
自定义一个 crontab 任务就行了吧,这样你想怎么定制都可以 要建立一个自动清理任务,通常使用 cron 作业是最简单的方法。 下面是如何设置一个 cron 作业来定期清空
确保 注意:在某些系统上,例如 Ubuntu,可能要求你使用 |
可以是可以,不过在 k8s 中有点麻烦,还得连接 pod 才能删除,并且可能多个节点,名字不是固定的。每个系统都得操作下,有点麻烦。 |
我得想一想怎么处理好一些,感觉由服务自己去清理日志有点奇怪 |
加个手动清理或者可配置,或者只有error才写入,其他不要写入。 |
例行检查
log会保存在 /data/log 下,但是不会自动清除,长时间运行后导致超出临时存储限制。
并且,挂载pvc后,每次重启后,并不会清空日志,导致磁盘直接满了无法启动。
解决方案
The text was updated successfully, but these errors were encountered: