【发布时间】:2026-02-05 23:25:01
【问题描述】:
我已经设置了一个带有一些 docker 容器的主机,其中 logspout 用于将所有日志记录转发到 syslog:
docker run --name="logspout" -d \
--restart=unless-stopped \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--log-opt tag="logspout" \
gliderlabs/logspout \
syslog://host-01.example.com:514
所有日志都在/var/log/syslog中
我现在想将它们拆分为每个容器的文件,因为它变得杂乱无章。
当我将 rsyslog 配置为使用不同的文件时:
munin-server.* /var/log/munin.log
我在 syslog 中收到以下消息:
May 9 12:44:39 docker-host-01 rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="13893" x-info="http://www.rsyslog.com"] start
May 9 12:44:39 docker-host-01 rsyslogd-2222: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
May 9 12:44:39 docker-host-01 rsyslogd-2184: action 'munin-server' treated as ':omusrmsg:munin-server' - please use ':omusrmsg:munin-server' syntax instead, 'munin-server' will not be supported in the future [v8.16.0 try http://www.rsyslog.com/e/2184 ]
May 9 12:44:39 docker-host-01 rsyslogd-3000: user name 'munin-se...' too long - ignored [v8.16.0]
May 9 12:44:39 docker-host-01 rsyslogd-2207: error during parsing file /etc/rsyslog.d/40-default.conf, on or before line 5: warnings occured in file '/etc/rsyslog.d/40-default.conf' around line 5 [v8.16.0 try http://www.rsyslog.com/e/2207 ]
有没有办法以某种方式更改名称(例如 munin-server)?还是该消息具有误导性?
【问题讨论】: