Rsyslog how to make limited log size and make it rotates

How to create limit size log make it rotates?

rsyslog will do it

# provides UDP syslog reception
input(type="imudp" port="514")

# provides TCP syslog reception
input(type="imtcp" port="514")

# List of sub networks authorized to connect :
$AllowedSender UDP,,
$AllowedSender TCP,,
1 Like

That config doesn’t limit log size or rotate the logs. To do that you need to combine rsyslog to “data filtrate” the logs and logrotate to control size and age of the logs.

But how to do this idk

Logrotate's an installable package.
This is a very good manual how to config logrotate.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.