Hi community,
I would like to use rsyslog on Openwrt to log also external TCP sources (i.e. IoT devices connected to OpenWrt).
I have read several guides on how to setup the rsyslog.conf file and I ended up with this config:
module (load="imuxsock")
module (load="imklog")
module(load="imudp")
input(type="imudp" port="514")
#Module (load="imtcp")
#Input (type="imtcp" port="514")
If $fromhost-ip == "192.168.1.10" then {
Action (type="omfile" file="/mnt/sda1/log/test.log")
}
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
*.info;mail.none;authpriv.none;cron.none /mnt/sda1/log
authpriv.* /var/log/secure
mail.* /var/log/maillog
cron.* /var/log/cron
local7.* /var/log/boot.log
But nothing is happening
Even if the TCP device is generating logs every 30 seconds, nothing is written in the test.log file.
I have also tried changing TCP and UDP but no results.
Thanks for supporting a Newbie!
Ugo