From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Rsyslog actions - Linux Tutorial
From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)
Rsyslog actions
- [Instructor] For every filter, there's an action. The action for a log filter usually involves saving the log messages to a file. For instance, in the case of cron* /var/log/cron.log, all cron messages are saved to the var.log/cron.log file. As this line is written, this file is synchronized on every write. This can create a lot of overhead if there are a lot of writes to the log. To keep from syncing the file system every time the log is written, we can precede the path with a dash. Be aware that the data's held in RAM since it's not read to the disk right away. This opens the possibility that you may lose data if the server shuts down unexpectedly. Log save paths can either be static as we saw in our previous example or dynamic. With a dynamic path, we can create a template and then use that template name, prefixed with a question mark, in the rule. The template for this example might look like this. It will create a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Locate and interpret system log files4m 57s
-
Read the system journal3m 23s
-
Configuration of logrotate2m 33s
-
Filter journal data by criteria1m 25s
-
Rsyslog actions1m 41s
-
Clear old systemd journal data2m 33s
-
Retrieve systemd journal data from a rescue system2m 18s
-
About syslog, rsyslog, and syslog-ng3m 32s
-
-
-
-
-
-
-
-
-
-