[rsyslog]: use # to separate container name and program name in syslog message (#1918)
Previously use / to separate container name and program name. However, in rsyslogd: Precisely, the programname is terminated by either (whichever occurs first): end of tag nonprintable character ‘:’ ‘[‘ ‘/’ The above definition has been taken from the FreeBSD syslogd sources. Signed-off-by: Guohan Lu <gulv@microsoft.com>
This commit is contained in:
parent
647af39ff0
commit
f3ca7c422f
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
## Make apt-get non-interactive
|
## Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
# Enable -O for all Python calls
|
# Enable -O for all Python calls
|
||||||
ENV PYTHONOPTIMIZE 1
|
ENV PYTHONOPTIMIZE 1
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
## Make apt-get non-interactive
|
## Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM docker-config-engine
|
FROM docker-config-engine
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
|
|
||||||
## Make apt-get non-interactive
|
## Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
## Quagga rules
|
## Quagga rules
|
||||||
|
|
||||||
if $programname == ["quagga",
|
if $programname == ["bgp#quagga",
|
||||||
"watchquagga",
|
"bgp#watchquagga",
|
||||||
"zebra"]
|
"bgp#zebra"]
|
||||||
then {
|
then {
|
||||||
/var/log/quagga/zebra.log
|
/var/log/quagga/zebra.log
|
||||||
stop
|
stop
|
||||||
}
|
}
|
||||||
|
|
||||||
if $programname == "bgpd" then {
|
if $programname == "bgp#bgpd" then {
|
||||||
/var/log/quagga/bgpd.log
|
/var/log/quagga/bgpd.log
|
||||||
stop
|
stop
|
||||||
}
|
}
|
||||||
@ -24,4 +24,4 @@ if $programname contains "teamd_" then {
|
|||||||
if $msg startswith " telemetry" or ($msg startswith " dialout" )then {
|
if $msg startswith " telemetry" or ($msg startswith " dialout" )then {
|
||||||
/var/log/telemetry.log
|
/var/log/telemetry.log
|
||||||
stop
|
stop
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user