diff --git a/rsyslog/Dockerfile b/rsyslog/Dockerfile new file mode 100644 index 0000000..0e4676c --- /dev/null +++ b/rsyslog/Dockerfile @@ -0,0 +1,16 @@ +FROM rhel7 + +ADD rsyslog.conf /etc/rsyslog.conf +RUN yum update -y \ + && yum -y install rsyslog \ + && yum clean all \ + && rm -rf /var/cache/yum \ + && chmod -R ugo+rw,+X /etc/rsyslog.conf /var/log/ /var/run/ + +VOLUME /var/log/ +WORKDIR /var/log/ + +EXPOSE 1601 +ENTRYPOINT [ "/usr/sbin/rsyslogd" ] +CMD [ "-4", "-n", "-f", "/etc/rsyslog.conf", "-i", "/var/run/rsyslog.pid" ] + diff --git a/rsyslog/README.md b/rsyslog/README.md new file mode 100644 index 0000000..7ee330c --- /dev/null +++ b/rsyslog/README.md @@ -0,0 +1,17 @@ +# rsyslog + +## Description + +## Build in OpenShift + +``` +oc new-build https://github.com/nmasse-itix/OpenShift-Docker-Images.git --context-dir rsyslog --name rsyslog --to rsyslog +``` + +## Deploy in OpenShift + +``` +oc new-app https://github.com/nmasse-itix/OpenShift-Docker-Images.git --context-dir rsyslog --name rsyslog +oc volume dc openldap --add --overwrite --name=rsyslog-volume-1 -t pvc --claim-size=512Mi --claim-name=rsyslog-data +``` + diff --git a/rsyslog/rsyslog.conf b/rsyslog/rsyslog.conf new file mode 100644 index 0000000..e9cc781 --- /dev/null +++ b/rsyslog/rsyslog.conf @@ -0,0 +1,9 @@ +module(load="imtcp") + +ruleset(name="remote1"){ + action(type="omfile" file="/var/log/messages") +} + + +input(type="imtcp" port="1601" ruleset="remote1" RateLimit.Interval="0" RateLimit.Burst="1000000000") +