File: basic_configuration.rst

package info (click to toggle)
rsyslog 8.2512.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 30,464 kB
  • sloc: ansic: 123,809; sh: 42,109; makefile: 5,962; javascript: 1,842; python: 1,222; lex: 607; yacc: 193; perl: 162; sql: 103; tcl: 9; ruby: 2
file content (33 lines) | stat: -rw-r--r-- 805 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Basic Configuration
===================

rsyslog reads its main configuration from:

``/etc/rsyslog.conf``

Additional configuration snippets can be placed in:

``/etc/rsyslog.d/*.conf``

Minimal Example
---------------

The following configuration logs all messages to `/var/log/syslog`:

.. code-block:: rsyslog

   # Load the input modules for system and kernel logging.
   module(load="imuxsock")  # Local system logs (e.g., from journald)
   module(load="imklog")    # Kernel log capture

   # Traditionally, a *.* selector ("all logs") is added here.
   # This is unnecessary, as it is the default behavior.
   # Therefore, no filter is explicitly shown.
   action(type="omfile" file="/var/log/syslog")

Apply changes by restarting rsyslog:

.. code-block:: bash

   sudo systemctl restart rsyslog