docker syslog format changed between docker-1.12.6 and docker-1.13
Issue
After updating docker
to version 1.13 on Red Hat Enterprise Linux 7.5 we noticed that our rsyslog
configuration does no longer pick-up the docker
logs. We are using syslog
as log driver in docker
and have the below customization in rsyslog
to create a log file for each container created. Can you please help us understand what happen, why there was a change and how to make this work again.
template(name="logfilename" type="string" string="/var/log/docker/container_%syslogtag:8:19%_%$YEAR%%$MONTH%%$DAY%.log" )
$umask 0000
ruleset(name="container_input"){
if $programname contains 'docker' then action(type="omfile" dirCreateMode="0770" FileCreateMode="0640" dirGroupNum="990" fileGroupNum="990" dynaFile="logfilename")
}
module(load="imudp")
input(type="imudp" address="127.0.0.1" port="514" ruleset="container_input")
Environment
- Red Hat Enterprise Linux 7.5
docker
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.