From the course: Linux System Engineer: Kernel Tuning and Remote Logging

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Log to a remote rsyslog server

Log to a remote rsyslog server

From the course: Linux System Engineer: Kernel Tuning and Remote Logging

Start my 1-month free trial

Log to a remote rsyslog server

- [Narrator] Rsyslog has the ability to log messages to a remote rsyslog server. This can be handy, as all messages can be aggregated to a central logging server. The change from a static file for an action to a remote server is quite easy. In our previous example, we were saving log messages to a file at /var/log/cron.log. To have these same messages sent to a remote server, we just change the action to be the remote server's IP address preceded by the @ symbol. Now all messages matching our filter will be forwarded to an rsyslog server at 192.168.1.100 using the UDP protocol. If we wanted to forward all messages from our local server to the remote rsyslog server, we just change the filter to *.* If we choose to use the TZP protocol, we can change the syntax slightly by adding a second @ symbol and a port number. This will forward all messages to 192.168.1.100 on port 6514. Be sure you have an rsyslog server answering requests on that port before trying this. If we don't add this…

Contents