December 28, 20232 yr I'm trying to use UnRAID's built-in syslog server to receive logs from a bunch of other machines in my network. The general logging itself is working fine, but I really don't like that UnRAID is using the client's IP address for the file name. Some clients connect over IPv4, some connect over IPv6. Some even switch between IPv4 and IPv6 (maybe one of them is down sometimes) and the logs end up in different files. Some are clients with a dynamic IPv6 (privacy extensions). I tried to have my remote backup UnRAID server send its logs to the "main" UnRAID server, too - but given that that server is behind a dynamic public IP, UnRAID will create new syslog log files over and over again every single time the IP changes. That makes the logs pretty useless since you can't really find stuff. Given that the syslog protocol is a standard format and each log entry starts with the date/time and then the hostname of the sending machine, why does UnRAID use an IP which can change all the time for the file name? Can a setting be added to UnRAID's syslog server so the file name for the received syslog messages contains the server name sent inside the syslog message (which will be constant) instead of just using the source IP address (which changes all the time)? EDIT: Looks like the relevant config is in /etc/rsyslog.conf: # ######### Receiving Messages from Remote Hosts ########## # TCP Syslog Server: # provides TCP syslog reception and GSS-API (if compiled to support it) $ModLoad imtcp # load module #$InputTCPServerRun 514 # start up TCP listener at port 514 # UDP Syslog Server: $ModLoad imudp # provides UDP syslog reception #$UDPServerRun 514 # start a UDP syslog server at standard port 514 $template remote,"/mnt/user/syslog/syslog-%FROMHOST-IP%.log" I could probably just edit this and modify the path, but I'm not sure when/if that'll be overwritten again by UnRAID. Basically, I'd just like to have an option in the UnRAID GUI to replace that stupid "%FROMHOST-IP%" with "%HOSTNAME%". The corresponding code in the webgui repo that would need to be changed is here. EDIT 2: Also, while we're at it, the HTML input field for the remote syslog server hostname is limited to 23 chars which is pretty short for a server name. When I edit the HTML and remove that restriction I can add a longer server name and it also works. Can that limit be removed / increased? EDIT 3: PR: https://github.com/unraid/webgui/pull/1563 Edited December 28, 20232 yr by Leseratte10
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.