見 https://www.thegeekdiary.com/configuring-remote-logging-using-rsyslog-in-centos-rhel/
Once the central log host is configured to accept remote logging, the rsyslog service can be configured on remote systems to send logs to the central log host. To configure a machine to send logs to a remote rsyslog server, add a line to the rules section in the /etc/rsyslog.conf file. In place of the file name, use the IP address of the remote rsyslog server. To use UDP, prefix the IP address with a single @ sign. To use TCP, prefix it with two @ signs (@@).
For instance, to have all messages with info or higher priority sent to loghost.example.com via UDP, use the following line:
*.info @loghost.example.com
To have all messages sent to loghost.example.com via TCP, use the following line:
*.* @@loghost.example.com
Optionally, the log hostname can be appended with :PORT, where PORT is the port that the remote rsyslog server is using. If no port is given, it assumes the default port 514.
After adding the rule(s), restart the rsyslog service and send a test message using the logger command:
[root@logclient ~]# logger "Test from logclient"
Check the logs on the remote server to ensure the message was received.