replace rsyslog with syslog-ng
This commit is contained in:
parent
bd3ca7ece8
commit
1f36b3a1e9
@ -1,6 +1,6 @@
|
|||||||
FROM quay.io/thallian/confd-env:latest
|
FROM quay.io/thallian/confd-env:latest
|
||||||
|
|
||||||
RUN apk add --no-cache postfix postfix-ldap rsyslog spamassassin-client libstdc++ g++ make tar libmilter-dev
|
RUN apk add --no-cache postfix postfix-ldap syslog-ng spamassassin-client libstdc++ g++ make tar libmilter-dev
|
||||||
|
|
||||||
RUN mkdir /tmp/spamass-milter
|
RUN mkdir /tmp/spamass-milter
|
||||||
RUN wget -qO- http://download.savannah.gnu.org/releases/spamass-milt/spamass-milter-0.4.0.tar.gz | tar -xz -C /tmp/spamass-milter --strip 1
|
RUN wget -qO- http://download.savannah.gnu.org/releases/spamass-milt/spamass-milter-0.4.0.tar.gz | tar -xz -C /tmp/spamass-milter --strip 1
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
# rsyslogd.conf
|
|
||||||
#
|
|
||||||
# if you experience problems, check:
|
|
||||||
# http://www.rsyslog.com/troubleshoot
|
|
||||||
|
|
||||||
#### MODULES ####
|
|
||||||
|
|
||||||
module(load="imuxsock") # local system logging support (e.g. via logger command)
|
|
||||||
#module(load="imklog") # kernel logging support (previously done by rklogd)
|
|
||||||
module(load="immark") # --MARK-- message support
|
|
||||||
module(load="imudp") # UDP listener support
|
|
||||||
|
|
||||||
|
|
||||||
input(type="imudp" port="514")
|
|
||||||
|
|
||||||
# Log all kernel messages to the console.
|
|
||||||
# Logging much else clutters up the screen.
|
|
||||||
#kern.* action(type="omfile" file="/dev/console")
|
|
||||||
|
|
||||||
# Log anything (except mail) of level info or higher.
|
|
||||||
# Don't log private authentication messages!
|
|
||||||
*.info;mail.none;authpriv.none;cron.none action(type="omfile" file="/var/log/messages")
|
|
||||||
|
|
||||||
# The authpriv file has restricted access.
|
|
||||||
authpriv.* action(type="omfile" file="/var/log/secure")
|
|
||||||
|
|
||||||
# Log all the mail messages in one place.
|
|
||||||
mail.* action(type="omfile" file="/dev/console")
|
|
||||||
|
|
||||||
# Log cron stuff
|
|
||||||
cron.* action(type="omfile" file="/var/log/cron")
|
|
||||||
|
|
||||||
# Everybody gets emergency messages
|
|
||||||
*.emerg action(type="omusrmsg" users="*")
|
|
||||||
|
|
||||||
# Save news errors of level crit and higher in a special file.
|
|
||||||
uucp,news.crit action(type="omfile" file="/var/log/spooler")
|
|
||||||
|
|
||||||
# Save boot messages also to boot.log
|
|
||||||
local7.* action(type="omfile" file="/var/log/boot.log")
|
|
||||||
|
|
||||||
# log every host in its own directory
|
|
||||||
if $fromhost-ip then /var/log/$fromhost-ip/messages
|
|
||||||
|
|
||||||
# Include all .conf files in /etc/rsyslog.d
|
|
||||||
$IncludeConfig /etc/rsyslog.d/*.conf
|
|
||||||
$template GRAYLOGRFC5424,"<%PRI%>%PROTOCOL-VERSION% %TIMESTAMP:::date-rfc3339% %HOSTNAME% %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg%\n"
|
|
||||||
*.info;mail.none;authpriv.none;cron.none;*.* @@graylog:514;GRAYLOGRFC5424 # forward everything to remote server
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv sh
|
|
||||||
|
|
||||||
exec rsyslogd -n
|
|
4
rootfs/etc/services.d/syslog-ng/run
Normal file
4
rootfs/etc/services.d/syslog-ng/run
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/with-contenv sh
|
||||||
|
|
||||||
|
cd /var
|
||||||
|
exec syslog-ng --foreground
|
8
rootfs/etc/syslog-ng/syslog-ng.conf
Normal file
8
rootfs/etc/syslog-ng/syslog-ng.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
destination catchall {
|
||||||
|
file(/dev/console);
|
||||||
|
};
|
||||||
|
|
||||||
|
log {
|
||||||
|
source(syslog);
|
||||||
|
destination(catchall);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user