Understanding rsyslog
The old syslog
logging system was created back in the 1980s for use on Unix and other Unix-like systems. It finally saw its last days in the Linux world only a few years ago. Nowadays, we use rsyslog
, which is a bit more robust and has a few more features. It works mainly the same on both Debian/Ubuntu-based and Red Hat-based distros, with only some differences in how the configuration files are set up. But, before we look at the differences, let’s look at what’s the same.
Understanding rsyslog logging rules
Logging rules define where to record messages for each particular system service:
- On Red Hat/CentOS/AlmaLinux systems, the rules are stored in the
/etc/rsyslog.conf
file. Just scroll down until you see the#### RULES ####
section. - On Debian/Ubuntu systems, the rules are in separate files in the
/etc/rsyslog.d/
directory. The main file that we care about for now is the50-default.conf
file, which contains the main logging...