diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2019-01-27 20:57:26 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2019-01-28 01:51:37 +0100 |
commit | 6327c4b8f67b993d5ca5d79924fe0e2c6551c798 (patch) | |
tree | 8afb70745564ec0ec7883b6539ca0017b7f2788b | |
parent | aefed8aa14e18fa59f1b7723809d48bc874ac08b (diff) | |
download | alpine_aports-6327c4b8f67b993d5ca5d79924fe0e2c6551c798.tar.bz2 alpine_aports-6327c4b8f67b993d5ca5d79924fe0e2c6551c798.tar.xz alpine_aports-6327c4b8f67b993d5ca5d79924fe0e2c6551c798.zip |
main/rsyslog: rewrite default config to new syntax and unify file names
-rw-r--r-- | main/rsyslog/APKBUILD | 6 | ||||
-rw-r--r-- | main/rsyslog/rsyslog.conf | 138 | ||||
-rw-r--r-- | main/rsyslog/rsyslog.logrotate | 21 |
3 files changed, 87 insertions, 78 deletions
diff --git a/main/rsyslog/APKBUILD b/main/rsyslog/APKBUILD index e9cb99da04..c33bc44578 100644 --- a/main/rsyslog/APKBUILD +++ b/main/rsyslog/APKBUILD | |||
@@ -145,6 +145,8 @@ package() { | |||
145 | install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname | 145 | install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname |
146 | install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname | 146 | install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname |
147 | install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf | 147 | install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf |
148 | |||
149 | install -m700 -d "$pkgdir"/var/lib/rsyslog | ||
148 | } | 150 | } |
149 | 151 | ||
150 | _plugin() { | 152 | _plugin() { |
@@ -169,7 +171,7 @@ _plugin() { | |||
169 | 171 | ||
170 | sha512sums="3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd rsyslog-8.40.0.tar.gz | 172 | sha512sums="3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd rsyslog-8.40.0.tar.gz |
171 | bcd63c8df2ac63b80f3cb51ba7f544988df6cd875f4e81020e762dff30d7537f21b72c95a4b1c08baf15f4ed5f03defbf3f061673aabada5841f45ab9f579374 rsyslog.initd | 173 | bcd63c8df2ac63b80f3cb51ba7f544988df6cd875f4e81020e762dff30d7537f21b72c95a4b1c08baf15f4ed5f03defbf3f061673aabada5841f45ab9f579374 rsyslog.initd |
172 | d54377ddf39197656811a84272568ea761f984e19dd04fc54f372dd04a9244e66d02b26ab33073d0344d054f031660ec611f3c7a18c266e7b68cef5e2c47f06f rsyslog.logrotate | 174 | b5cbdcfa601ae8e7617289e7805fe71daa17bd03a7a30e1e1aad7a58a4ad4c1d89c9a203228f15816232ab6ab6d7a2752f7bbf4d259bbd5eccbe9728dc7e8aaa rsyslog.logrotate |
173 | 3bcd58b222eb7f4d8a42a0643cacb6ab44790f90c9bd550678e002bc19863d5d6a7341e5e5ba0b9292f85c6c04cd5cc42d174acdc63e8ba22022620db10f2b9b rsyslog.conf | 175 | 9c9913b3367ac4d0b0f998ffa3aaaf136cf939ed4275f13f79d4c7336d0978007af13cb2c6f35d17ef25a53907fb064705f23c3b3a6a6fcd06ae85c3c51c7e38 rsyslog.conf |
174 | 04f1c8060b9439fe25f9a4291697c577fb3d540aefcd67ed6d63d416c1dd0306fa68ae89745af2b4dc2e288d46aadd9c7a96ccfaaf3a146d9d76bd3433e3c1a5 musl-fix.patch | 176 | 04f1c8060b9439fe25f9a4291697c577fb3d540aefcd67ed6d63d416c1dd0306fa68ae89745af2b4dc2e288d46aadd9c7a96ccfaaf3a146d9d76bd3433e3c1a5 musl-fix.patch |
175 | 7be105f9a30d23b48ee46e19d31ba37ec30477935a9f7ba3929666a9abe175313dbb7caf55fbb1c6579dd5d25fe037eea84cae9065fe3f765f23569344bce5d7 queue.patch" | 177 | 7be105f9a30d23b48ee46e19d31ba37ec30477935a9f7ba3929666a9abe175313dbb7caf55fbb1c6579dd5d25fe037eea84cae9065fe3f765f23569344bce5d7 queue.patch" |
diff --git a/main/rsyslog/rsyslog.conf b/main/rsyslog/rsyslog.conf index 6e81fc4171..d2706daa27 100644 --- a/main/rsyslog/rsyslog.conf +++ b/main/rsyslog/rsyslog.conf | |||
@@ -1,94 +1,96 @@ | |||
1 | # rsyslog v5: load input modules | 1 | # rsyslog configuration file |
2 | # If you do not load inputs, nothing happens! | 2 | # |
3 | # You may need to set the module load path if modules are not found. | 3 | # For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html |
4 | # or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html | ||
5 | # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html | ||
6 | |||
7 | |||
8 | #### Global directives #### | ||
4 | 9 | ||
5 | $ModLoad immark.so # provides --MARK-- message capability | 10 | # Sets the directory that rsyslog uses for work files. |
6 | $ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command) | 11 | $WorkDirectory /var/lib/rsyslog |
7 | $ModLoad imklog.so # kernel logging (formerly provided by rklogd) | ||
8 | 12 | ||
9 | # default permissions for all log files. | 13 | # Sets default permissions for all log files. |
10 | $FileOwner root | 14 | $FileOwner root |
11 | $FileGroup adm | 15 | $FileGroup adm |
12 | $FileCreateMode 0640 | 16 | $FileCreateMode 0640 |
13 | $DirCreateMode 0755 | 17 | $DirCreateMode 0755 |
14 | $Umask 0022 | 18 | $Umask 0022 |
15 | 19 | ||
16 | # Include configuration files from directory | 20 | # Check config syntax on startup and abort if unclean (default off). |
17 | $IncludeConfig /etc/rsyslog.d/* | ||
18 | |||
19 | # Check config syntax on startup and abort if unclean (default off) | ||
20 | #$AbortOnUncleanConfig on | 21 | #$AbortOnUncleanConfig on |
21 | 22 | ||
22 | # Reduce repeating messages (default off) | 23 | # Reduce repeating messages (default off). |
23 | #$RepeatedMsgReduction on | 24 | #$RepeatedMsgReduction on |
24 | 25 | ||
25 | # Log all kernel messages to the console. | 26 | # Include all config files in /etc/rsyslog.d/. |
26 | # Logging much else clutters up the screen. | 27 | include(file="/etc/rsyslog.d/*.conf" mode="optional") |
27 | #kern.* /dev/console | 28 | |
29 | |||
30 | #### Modules #### | ||
31 | |||
32 | # Provides --MARK-- message capability. | ||
33 | module(load="immark") | ||
34 | |||
35 | # Provides support for local system logging (e.g. via logger command). | ||
36 | module(load="imuxsock") | ||
37 | |||
38 | # Reads kernel messages. | ||
39 | module(load="imklog") | ||
40 | |||
41 | |||
42 | #### Rules #### | ||
43 | |||
44 | # Log all kernel messages to kern.log. | ||
45 | kern.* /var/log/kern.log | ||
28 | 46 | ||
29 | # Log anything (except mail) of level info or higher. | 47 | # Log anything (except mail) of level info or higher. |
30 | # Don't log private authentication messages! | 48 | # Don't log private authentication messages! |
31 | *.info;mail.none;authpriv.none;cron.none -/var/log/messages | 49 | # NOTE: The minus sign in front of filename disables buffer flush. |
50 | *.info;authpriv.none;cron.none;kern.none;mail.none -/var/log/messages | ||
32 | 51 | ||
33 | # The authpriv file has restricted access. | 52 | # The authpriv file has restricted access. |
34 | authpriv.* /var/log/secure | 53 | authpriv.* /var/log/auth.log |
35 | 54 | ||
36 | # Log all the mail messages in one place. | 55 | # Log all the mail messages in one place. |
37 | mail.* -/var/log/maillog | 56 | mail.* -/var/log/mail.log |
57 | |||
58 | # Log cron stuff. | ||
59 | cron.* -/var/log/cron.log | ||
38 | 60 | ||
39 | # Log cron stuff | 61 | # Everybody gets emergency messages. |
40 | cron.* -/var/log/cron | 62 | *.emerg :omusrmsg:* |
41 | 63 | ||
42 | # Everybody gets emergency messages | 64 | # Save boot messages also to boot.log. |
43 | *.emerg :omusrmsg:* | 65 | local7.* /var/log/boot.log |
44 | 66 | ||
45 | # Save news errors of level crit and higher in a special file. | 67 | # Log all kernel messages to the console. |
46 | uucp,news.crit -/var/log/spooler | 68 | # Logging much else clutters up the screen. |
69 | #kern.* /dev/console | ||
47 | 70 | ||
48 | # Save boot messages also to boot.log | ||
49 | local7.* /var/log/boot.log | ||
50 | 71 | ||
51 | # More configuration examples: | 72 | ### Examples #### |
52 | # | 73 | |
53 | # Remote Logging (we use TCP for reliable delivery) | 74 | # Send all logs to remote syslog via UDP. |
54 | # An on-disk queue is created for this action. If the remote host is | 75 | # An on-disk queue is created for this action. If the remote host is |
55 | # down, messages are spooled to disk and sent when it is up again. | 76 | # down, messages are spooled to disk and sent when it is up again. |
56 | #$WorkDirectory /var/spool/rsyslog # where to place spool files | 77 | #*.* action( |
57 | #$ActionQueueFileName uniqName # unique name prefix for spool files | 78 | # type="omfwd" |
58 | #$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) | 79 | # target="192.168.0.1" |
59 | #$ActionQueueSaveOnShutdown on # save messages to disk on shutdown | 80 | # port="514" |
60 | #$ActionQueueType LinkedList # run asynchronously | 81 | # protocol="udp" |
61 | #$ActionResumeRetryCount -1 # infinety retries if host is down | 82 | # queue.filename="fwdRule1" # unique name prefix for spool files |
62 | #$ActionResumeInterval 30 # retry interval | 83 | # queue.type="LinkedList" |
63 | # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional | 84 | # queue.maxDiskSpace="256m" |
64 | #*.* @@remote-host | 85 | # queue.saveOnShutdown="on" |
65 | 86 | # action.resumeRetryCount="-1" | |
66 | # Remote Logging with TCP + SSL/TLS | 87 | # action.resumeInterval="30" |
67 | #$DefaultNetstreamDriver gtls | 88 | #) |
68 | #$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem | 89 | |
69 | #$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_CLIENT.cert.pem | 90 | # Receive messages from remote host via UDP |
70 | #$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_CLIENT.key.pem | 91 | # for parameters see http://www.rsyslog.com/doc/imudp.html |
71 | #$ActionSendStreamDriverAuthMode x509/name # enable peer authentication | 92 | #module(load="imudp") # needs to be done just once |
72 | #$ActionSendStreamDriverPermittedPeer foo # authorize to send encrypted data to server foo | 93 | #input( |
73 | #$ActionSendStreamDriverMode 1 # run driver in TLS-only mode | 94 | # type="imudp" |
74 | 95 | # port="514" | |
75 | # ######### Receiving Messages from Remote Hosts ########## | 96 | #) |
76 | # TCP Syslog Server: | ||
77 | #$ModLoad imtcp # provides TCP syslog reception | ||
78 | #$TCPServerRun 10514 # start a TCP syslog server at port 10514 | ||
79 | |||
80 | # TCP + SSL/TLS Syslog Server: | ||
81 | #$ModLoad imtcp # provides TCP syslog reception | ||
82 | #$DefaultNetstreamDriver gtls # use gnuTLS for data encryption | ||
83 | #$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem | ||
84 | #$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_SERVER.cert.pem | ||
85 | #$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_SERVER.key.pem | ||
86 | #$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode | ||
87 | #$InputTCPServerStreamDriverAuthMode x509/name # enable peer authentication | ||
88 | #$InputTCPServerStreamDriverPermittedPeer bar # authorize client named bar (one line per client) | ||
89 | #$TCPServerRun 10514 # start a TCP syslog server at port 10514 | ||
90 | |||
91 | # UDP Syslog Server: | ||
92 | #$ModLoad imudp.so # provides UDP syslog reception | ||
93 | #$UDPServerRun 514 # start a UDP syslog server at standard port 514 | ||
94 | |||
diff --git a/main/rsyslog/rsyslog.logrotate b/main/rsyslog/rsyslog.logrotate index 86095def1c..6a3d01a740 100644 --- a/main/rsyslog/rsyslog.logrotate +++ b/main/rsyslog/rsyslog.logrotate | |||
@@ -1,9 +1,14 @@ | |||
1 | # Copyright 1999-2010 Gentoo Foundation | 1 | /var/log/auth.log |
2 | # Distributed under the terms of the GNU General Public License v2 | 2 | /var/log/boot.log |
3 | # $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.logrotate,v 1.1 2010/10/21 07:38:29 dev-zero Exp $ | 3 | /var/log/cron.log |
4 | /var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log { | 4 | /var/log/kern.log |
5 | sharedscripts | 5 | /var/log/mail.log |
6 | postrotate | 6 | /var/log/messages |
7 | /etc/init.d/rsyslog reload &>/dev/null || true | 7 | { |
8 | endscript | 8 | notifempty |
9 | compress | ||
10 | sharedscripts | ||
11 | postrotate | ||
12 | /etc/init.d/rsyslog --ifstarted reload >/dev/null | ||
13 | endscript | ||
9 | } | 14 | } |