I am trying to configure a rsyslog server which will collect logs from remote hosts. I have been able to get this working however, the server is also send local logs to the log file where I wish the remote logs to be logged.
After looking at the docs I see that they use the
& ~ after the statements defining the remote logging settings. This according to the docs should prevent local logs from being written to my remote log file.
When I put that line in though, it breaks the service. I receive this error:
rsyslogd: version 8.24.0-34.el7, config validation run (level 1), master config /etc/rsyslog.conf rsyslogd: error during parsing file /etc/rsyslog.conf, on or before line 26: syntax error on token '&' [v8.24.0-34.el7 try http://www.rsyslog.com/e/2207 ] rsyslogd: CONFIG ERROR: could not interpret master config file '/etc/rsyslog.conf'. [v8.24.0-34.el7 try http://www.rsyslog.com/e/2207 ]
Here is the relevant section of my config file:
$template RemoteLogs,"/var/log/LOGTEST/test.log" *.* ?RemoteLogs *.info,mail.none,authpriv.none,cron.none & ~
Is there something simple that I am missing??? Thanks!