You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: To add "-v /dev/log:/dev/log" -like functionality in "--log-driver sysslog" #13726
Current implementation of the syslog logging driver can only send STDOUT and STDERR of the process running under container to the host's syslog with info and err levels accordingly. However, lots of software support logging to syslog natively, that allows to specify different parameters (like severity, facility, tag, etc) for different messages. By using STDOUT/ERR logging only we loose these abilities.
The idea is to make the syslog logging driver to also try mounting host's /dev/log to container'd /dev/log, so the software supporting logging to syslog could do this. Probably it would also be nice to redefine the message line of the syslog messages to reflect the container id like it is done for STDOUT/ERR currently.
Yes, I know that I can do it myself by specifying "-v /dev/log:/dev/log", but I think that it makes a lot of sense to have it supported natively by the driver.
@grayhemp what you could do is run heka on host, and customize everything with its filters. So for example your heka could create the /var/run/dockerlog listening UDP socket and then you'd pass it to all containers (as /dev/log) with the volume syntax. I've submitted a working example of a native syslog receiver to heka, you might find it still there (although wasn't merged, AFAIK).
Well, my workaround is to run a syslog container mapping /dev/log on host and to do the same for other containers. What I'm suggesting is to make this more transparent. @gdm85, but thank you anyway, heka looks really interesting.
Closing because I just don't think this is something that can be done in a reliable way across containers, and probably is not the job of the engine to handle this.
I'd recommend if you want to talk to syslog directly then provide those socket details to your container process.
Activity
malcolmgreaves commentedon Jun 4, 2015
+1 : Just my 2 cents.
inanna-malick commentedon Jun 4, 2015
+1: seems reasonable.
gdm85 commentedon Jun 4, 2015
@grayhemp what you could do is run heka on host, and customize everything with its filters. So for example your heka could create the
/var/run/dockerloglistening UDP socket and then you'd pass it to all containers (as /dev/log) with the volume syntax. I've submitted a working example of a native syslog receiver to heka, you might find it still there (although wasn't merged, AFAIK).grayhemp commentedon Jun 8, 2015
Well, my workaround is to run a syslog container mapping /dev/log on host and to do the same for other containers. What I'm suggesting is to make this more transparent. @gdm85, but thank you anyway, heka looks really interesting.
gdm85 commentedon Jun 9, 2015
@grayhemp yeah that'd work too. I mentioned heka because it has a huge customization surface
cpuguy83 commentedon Sep 15, 2015
Closing because I just don't think this is something that can be done in a reliable way across containers, and probably is not the job of the engine to handle this.
I'd recommend if you want to talk to syslog directly then provide those socket details to your container process.