Permalink
Browse files

centos7: add base rsyslog container

  • Loading branch information...
rgerhards committed Mar 4, 2018
1 parent 486e2ec commit 7af02fa94932164af0ee25491ff3cef236300550
Showing with 89 additions and 0 deletions.
  1. +14 −0 base/centos7/Dockerfile
  2. +15 −0 base/centos7/README.md
  3. +1 −0 base/centos7/build.sh
  4. +59 −0 base/centos7/rsyslog.conf
@@ -0,0 +1,14 @@
FROM centos:7
LABEL maintainer="rgerhards@adiscon.com"
RUN yum -y install wget \
&& cd /etc/yum.repos.d/ \
&& wget http://rpms.adiscon.com/v8-stable/rsyslog.repo
RUN yum -y install rsyslog \
rsyslog-elasticsearch \
rsyslog-imptcp \
rsyslog-imrelp \
rsyslog-mmjsonparse \
rsyslog-omrelp \
rsyslog-omstdout \
&& rm /etc/rsyslog.d/listen.conf
COPY rsyslog.conf /etc/rsyslog.conf
@@ -0,0 +1,15 @@
## rsyslog base container for CentOS 7

This container just provides a fresh rsyslog with frequently used
modules on top of CentOS 7.

Use this, if you

a) want to build your own container based on current rsyslog
b) want to run rsyslog with a custom config by you
c) want to run a client machine where rsyslog processes log messages
(the default CentOS 7 config does NOT work inside a container, but
this container has a corrected config!)

note that in case b) you need to make sure that you use volumes
etc properly. No specific support for this has been added.
@@ -0,0 +1 @@
docker build $* -t rsyslog/rsyslog_base_centos7:latest .
@@ -0,0 +1,59 @@
# rsyslog configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

# The imjournal module bellow is now used as a message source instead of imuxsock.
module(load="imuxsock")
#$ModLoad immark # provides --MARK-- message capability

# Provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514


#### GLOBAL DIRECTIVES ####

# Where to place auxiliary files
$WorkDirectory /var/lib/rsyslog

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf


module(load="omstdout")
*.* :omstdout:


# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* -/var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg :omusrmsg:*

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log

0 comments on commit 7af02fa

Please sign in to comment.