From ebe080bd1f28628a466a1ec71fd36f8dd4badb80 Mon Sep 17 00:00:00 2001 From: kev Date: Sat, 29 Oct 2016 16:22:21 +0800 Subject: [PATCH] update rsyslog --- rsyslog/Dockerfile | 2 +- rsyslog/README.md | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/rsyslog/Dockerfile b/rsyslog/Dockerfile index 0a6460c..5bf7a32 100644 --- a/rsyslog/Dockerfile +++ b/rsyslog/Dockerfile @@ -3,7 +3,6 @@ # FROM alpine - MAINTAINER kev RUN set -xe \ @@ -18,6 +17,7 @@ RUN set -xe \ } >> /etc/rsyslog.conf VOLUME /var/log +WORKDIR /var/log EXPOSE 514/tcp \ 514/udp diff --git a/rsyslog/README.md b/rsyslog/README.md index aa941ce..8fe9266 100644 --- a/rsyslog/README.md +++ b/rsyslog/README.md @@ -1,6 +1,8 @@ rsyslog ======= +[RSYSLOG][1] is the rocket-fast system for log processing. + ## docker-compose.yml ```yaml @@ -18,8 +20,19 @@ rsyslog: ```bash $ docker-compose up -d + $ docker-compose exec rsyslog sh ->>> logger -t debug hello world ->>> tail /var/log/messages -2016-10-29T07:52:15.177918+00:00 c88f52cf86b6 debug: hello world +>>> pwd +/var/log +>>> touch maillog +>>> tail -f /var/log/maillog +2016-10-29T08:17:34+00:00 172.17.0.1 root: hello +2016-10-29T08:17:41+00:00 172.17.0.1 root: world +^C +>>> exit + +$ logger -n localhost -p mail.debug hello +$ logger -n localhost -p mail.info world ``` + +[1]: http://www.rsyslog.com/