jan kaufman | 28d7d89 | 2015-12-04 21:36:59 +0100 | [diff] [blame] | 1 | |
| 2 | ================================== |
| 3 | rsyslog |
| 4 | ================================== |
| 5 | |
| 6 | In computing, syslog is a widely used standard for message logging. It permits separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them. |
| 7 | |
| 8 | Sample pillars |
| 9 | ============== |
| 10 | |
jan kaufman | 1a4044c | 2016-03-10 18:51:58 +0100 | [diff] [blame] | 11 | Rsyslog service with default logging template |
| 12 | |
| 13 | .. code-block:: yaml |
| 14 | |
| 15 | rsyslog: |
| 16 | client: |
| 17 | enabled: true |
| 18 | |
| 19 | |
| 20 | Rsyslog service with precise timestamps, severity, facility. |
jan kaufman | 28d7d89 | 2015-12-04 21:36:59 +0100 | [diff] [blame] | 21 | |
| 22 | .. code-block:: yaml |
| 23 | |
| 24 | rsyslog: |
| 25 | client: |
| 26 | enabled: true |
| 27 | format: |
| 28 | name: TraditionalFormatWithPRI |
jan kaufman | 1a4044c | 2016-03-10 18:51:58 +0100 | [diff] [blame] | 29 | template: '"%syslogpriority% %syslogfacility% %timestamp:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"' |
jan kaufman | 91532f9 | 2016-03-31 13:45:02 +0200 | [diff] [blame^] | 30 | logfiles: |
| 31 | file: |
| 32 | -/var/log/syslog: |
| 33 | filter: *.*;auth,authpriv.none |
| 34 | owner: syslog |
| 35 | group: adm |
| 36 | createmode: 0640 |
| 37 | umask: 0022 |
| 38 | /var/log/auth.log: |
| 39 | filter: auth,authpriv.* |
| 40 | owner: syslog |
| 41 | group: adm |
| 42 | createmode: 0640 |
| 43 | umask: 0022 |
| 44 | -/var/log/kern.log: |
| 45 | filter: kern.* |
| 46 | owner: syslog |
| 47 | group: adm |
| 48 | createmode: 0640 |
| 49 | umask: 0022 |
| 50 | -/var/log/mail.log: |
| 51 | filter: mail.* |
| 52 | owner: syslog |
| 53 | group: adm |
| 54 | createmode: 0640 |
| 55 | umask: 0022 |
| 56 | /var/log/mail.err: |
| 57 | filter: mail.err |
| 58 | owner: syslog |
| 59 | group: adm |
| 60 | createmode: 0640 |
| 61 | umask: 0022 |
| 62 | ":omusrmsg:*": |
| 63 | filter: *.emerg |
| 64 | "|/dev/xconsole": |
| 65 | filter: "daemon.*;mail.*; news.err; *.=debug;*.=info;*.=notice;*.=warn": |
jan kaufman | 1a4044c | 2016-03-10 18:51:58 +0100 | [diff] [blame] | 66 | |
jan kaufman | 28d7d89 | 2015-12-04 21:36:59 +0100 | [diff] [blame] | 67 | |
| 68 | Read more |
| 69 | ========= |
| 70 | |
| 71 | http://www.rsyslog.com/ |
| 72 | https://wiki.gentoo.org/wiki/Rsyslog |
| 73 | https://github.com/saz/puppet-rsyslog |