[Lxc-users] Use host syslog socket in container
Vallevand, Mark K
Mark.Vallevand at UNISYS.com
Thu May 23 18:42:52 UTC 2013
Here is how I got syslog to work with a program running in a container. After creating a container, do something like this:
echo syslog setup
cat <<EOF > /etc/rsyslog.d/99-lxc-1.conf
\$AddUnixListenSocket /var/lib/lxc/container1/rootfs/dev/log
EOF
restart rsyslog
If you are using rsyslog, of course. The rsyslog daemon only supports 100 unix domain sockets. So, I guess that means 1 for the host /dev/log and 99 more for containers.
My program happily uses syslog and they end up in the host syslog.
Regards.
Mark K Vallevand Mark.Vallevand at Unisys.com<mailto:Mark.Vallevand at Unisys.com>
May you live in interesting times, may you come to the attention of important people and may all your wishes come true.
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
From: Vallevand, Mark K
Sent: Wednesday, May 22, 2013 3:21 PM
To: LXC Users
Subject: Use host syslog socket in container
I am running a program in a container. The program uses syslog and I'd like the /dev/log socket in the container to refer to /dev/log in the host file system.
Suggestions?
Regards.
Mark K Vallevand Mark.Vallevand at Unisys.com<mailto:Mark.Vallevand at Unisys.com>
May you live in interesting times, may you come to the attention of important people and may all your wishes come true.
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130523/635cdfb3/attachment.html>
More information about the lxc-users
mailing list