I'm trying to log events from my router on my Raspberry Pi using rsyslog. Everything works fine: the logs are logged on the Pi, but in the wrong file. Everything is logged in /var/log/syslog instead of my own created file /var/log/networkingrouter.log. I created the file myself and gave the correct permissions (I hope) with: chmod -rw-r--r-- syslog networkingrouter.log
The rules I used to put the logs in my own logfile are in /etc/rsyslog.d/rsyslog.d:
$template NetworkLog,"<%PRI%>%TIMESTAMP% % HOSTNAM% %syslogtag%%msg%"
:fromhost-ip, isequal, "192.168.178.1" /var/log/networkrouter.log;NetWorklog
& ~
Do you know what's going on here?
Thanks in advance!
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 228
تاريخ: يکشنبه
6 تير
1395 ساعت: 22:28