Im trying to filter out all syslog messages except those who are defined in my config and then send the message to an external syslog server. I have Ubuntu 16.04 with rsyslog, and I have configured Nextcloud to log to the syslog daemon.
my message(from /var/syslog) I want to allow being sent to the external syslog server:
Jul 11 15:55:28 test-virtual-machine ownCloud[28466]: {files_antivirus} Infected file deleted. Eicar-Test-Signature File: files/eicar(3).com.ocTransferId993388412.part Acccount: admin
I have tried to modify the rsyslog.conf file (rest of the file is default):
nextcloud.* -/var/log/nextcloud.log
:msg, contains, "*Infected*" -/var/log/nextcloud3.log
nextcloud.* @remote-host:514
this is not working at all. Anyone have some inputs?
Thanks,