I have setup rsyslog on Ubuntu server, and would like it to receive logs from various devices on my network. I have mounted a separate drive to store the logs on (/mnt/storage/logs). I have uncommitted the and lines in /etc/rsyslog.conf.
I have added a file /etc/rsyslog.d/30-gateway.conf with the following code, and the server is receiving logs successfully from my router.
Code:
$template DynFile,"/mnt/storage/logs/gateway/%$year%%$month%%$day%.log"
:fromhost-ip, isequal, "192.168.2.1" ?DynFile
:fromhost-ip, isequal, "192.168.2.1" ~
I have also added a file for the media server (ubuntu), but the server is not receiving the logs.
Code:
$template DynFile,"/mnt/storage/logs/media/%$year%%$month%%$day%.log"
:fromhost-ip, isequal, "192.168.2.13" ?DynFile
:fromhost-ip, isequal, "192.168.2.13" ~
On the media server I have added the following code to /etc/rsyslog.conf
Code:
$ModLoad imuxsock # provides support for local system logging$ModLoad imklog # provides kernel logging support
#$ModLoad immark # provides --MARK-- message capability
*.* @192.168.2.12:514
Bookmarks