【发布时间】:2020-10-14 01:03:29
【问题描述】:
您好,我需要配置文件:
if $FROMHOST-IP == '192.168.xx.xxx' then { action(type="omfile" file="/var/log/rsyslog/myHostName/device.log") }
else {*.* ?RemoteHost}
但是重启后 rsyslog 给我这个消息:
Oct 13 12:12:40 syslog-new rsyslogd[29378]: error during parsing file /etc/rsyslog.conf, on or before line 118: syntax error on token 'else' [v8.1901.0 try https://www.rsyslog.com/e/2207 ]
Oct 13 12:12:40 syslog-new rsyslogd[29378]: could not interpret master config file '/etc/rsyslog.conf'. [v8.1901.0 try https://www.rsyslog.com/e/2207 ]
请帮忙。 谢谢
【问题讨论】: