远程日志单独保存
[root@log-server ~]# vim /etc/rsyslog.conf
[root@log-server ~]# man 5 rsyslog.conf
$template DynFile,"/var/log/system-%HOST-NAME%.log"
将这行粘贴在/etc/rsyslog.conf的最后
$template DynFile,"/var/log/system-%HOST-NAME%.log"
local0.* ?DynFile ?是调用
重启服务
[root@log-server ~]# service rsyslog restart
客户端测试