Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpetazzo/syslogdocker
https://github.com/jpetazzo/syslogdocker
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jpetazzo/syslogdocker
- Owner: jpetazzo
- Created: 2014-08-25T03:25:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-05T21:10:48.000Z (almost 8 years ago)
- Last Synced: 2024-07-03T06:33:00.875Z (4 months ago)
- Size: 3.91 KB
- Stars: 70
- Watchers: 4
- Forks: 19
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# One syslog to rule them all
1. Build the syslog container:
`docker build -t syslog .`
2. Monitor the logs:
`docker run --volumes-from syslog ubuntu tail -f /var/log/syslog`
3. Run it:`docker run --name syslog -d -v /tmp/syslogdev:/dev syslog`
4. Start another container to send logs:
`docker run -v /tmp/syslogdev/log:/dev/log ubuntu logger hello`
5. *Alternative to #2*, as of docker v1.3 use the `docker-exec` command to inspect syslog container directly, after some logs have been generated
`docker exec -t syslog tail -f /var/log/syslog`6. See in the log message show up in the "tail" container.
## Background
For more information on this approach, see [Multiple Docker containers logging to a single syslog](http://jpetazzo.github.io/2014/08/24/syslog-docker/).
## Other methods
See [#4](https://github.com/jpetazzo/syslogdocker/issues/4#issue-95955147) for insights about
achieving similar results without requiring an host bind moount (thanks @helderco!)