过滤 docker 系统日志 run-docker-runtime\x2drunc-moby- xxxxxx .mount: Succeeded
现象:
ubuntu 日志文件 /var/log/syslog 有如下格式的 docker 日志
Dec 14 13:45:10 homenas systemd[45118]: run-docker-runtime\x2drunc-moby-0e63ea7cff5a4f6342916787a3f31d4c62f3aa3a5855f70753b63cd7ab8af849-runc.DekBPz.mount: Succeeded. Dec 14 13:45:10 homenas systemd[1]: run-docker-runtime\x2drunc-moby-0e63ea7cff5a4f6342916787a3f31d4c62f3aa3a5855f70753b63cd7ab8af849-runc.DekBPz.mount: Succeeded. Dec 14 13:45:30 homenas systemd[45118]: run-docker-runtime\x2drunc-moby-d693aa5462b6d50307ba9ededdfdb214cb5be92040924e9a8b9084d5e7e71855-runc.2B9diL.mount: Succeeded. Dec 14 13:45:30 homenas systemd[1]: run-docker-runtime\x2drunc-moby-d693aa5462b6d50307ba9ededdfdb214cb5be92040924e9a8b9084d5e7e71855-runc.2B9diL.mount: Succeeded. Dec 14 13:45:40 homenas systemd[1]: run-docker-runtime\x2drunc-moby-0e63ea7cff5a4f6342916787a3f31d4c62f3aa3a5855f70753b63cd7ab8af849-runc.VMwVEw.mount: Succeeded. Dec 14 13:45:40 homenas systemd[45118]: run-docker-runtime\x2drunc-moby-0e63ea7cff5a4f6342916787a3f31d4c62f3aa3a5855f70753b63cd7ab8af849-runc.VMwVEw.mount: Succeeded.
原因:
未知,但是可以通过下面方法把这种日志过滤掉。
解决:
新增 /etc/rsyslog.d/01-blocklist.conf 内容如下:
if $msg contains "run-docker-runtime" and $msg contains ".mount: Succeeded." then { stop }
重启日志服务
systemctl restart rsyslog
0顶
0 踩
共 0 条评论