starcat Posted November 3, 2010 Share Posted November 3, 2010 Anyone tried redirecting the syslog of unRAID to an external syslog server, say over UDP 514? Thanks! Link to comment
WeeboTech Posted November 4, 2010 Share Posted November 4, 2010 Anyone tried redirecting the syslog of unRAID to an external syslog server, say over UDP 514? Thanks! Works fine. This is one of my startup scripts. #!/bin/bash cp /boot/custom/etc/syslog.conf /etc/syslog.conf read PID < /var/run/syslogd.pid kill -1 ${PID} dmesg | logger -tdmesg -plocal7.info -i This is my /boot/custom/etc/syslog.conf file. # /etc/syslog.conf # # Facilities: auth, authpriv, cron, daemon, kern, lpr, mail, mark, # news, security (same as auth), syslog, user, uucp, local0 thru local7. # Here are the priorities in descending order: # emerg, panic # alert # crit # err, error <= samba debug level 0 # warnning, warn <= samba debug level 1 # notice <= samba debug level 2 # info <= samba debug level 3 # debug <= sambe debug level 4+ # Everything to syslog: *.* -/var/log/syslog *.* -/dev/tty12 *.* [email protected] # Emergency level messages go to all users: *.emerg * use an IP address instead of hostname just in case name resolution is not working. I also put the output to /dev/tty12 so the machine's last few messages can be watched in a pinch. Link to comment
starcat Posted November 4, 2010 Author Share Posted November 4, 2010 WeeboTech, thanks! Eager to implement asap. Link to comment
starcat Posted November 9, 2010 Author Share Posted November 9, 2010 Works like a charm! Thanks again! Link to comment
mbryanr Posted July 22, 2011 Share Posted July 22, 2011 Thanks for this! Synology just implemented a syslog server in their DSM 3.2 http://www.synology.com/dsm/dsm3.2beta_syslog_package.php?lang=us and I was searching around for just this solution. If anyone has any improvements...just post here. Link to comment
mbryanr Posted September 1, 2011 Share Posted September 1, 2011 Wanted to update that this works perfectly. Thanks Weebo! One sysloglog entry after the reboot was this: Tower dmesg[4172]: process `syslogd' is using obsolete setsockopt SO_BSDCOMPAT A little google search found it is a result of syslogd uses an obsolete socket option in 2.6.xx - but still works.. syslogd is using obsolete setsockopt so_bsdcompat process `syslogd' is using obsolete setsockopt SO_BSDCOMPAT The sysklogd package uses a socket option which still works in 2.6 but is deprecated. This package hasn't been updated yet (you can check here). You can ignore the message, or install the alternative syslog-ng package. which is corrected with syslog 1.5.1 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=201231 Source: sysklogd Source-Version: 1.5-1 We believe that the bug you reported is fixed in the latest version of sysklogd... Attached the output from my unRAID server to the Synology. Very nice since I have remote access to the Synology...I can keep track of the unRAID at all times! ... Does 5.0BetaX use syslog 1.5-1? I did find a way to install syslog-ng...but I'm not that skilled to not make my unRAID fubar. http://www.linuxquestions.org/questions/slackware-14/syslog-ng-instead-of-syslog-638619/ Also get email messages from Synology..sweet! Dear user, There are some system logs reached on DiskStation. Please check out the details on the system. The content of logs are as follows: Host: '192.168.1.108', IP: '192.168.1.108', Level: 'err', Date: '2011-08-31', Time: '20:19:19', Program: 'mountd', Message: 'Caught signal 15, un-registering and exiting.' Sincerely, Synology DiskStation . Link to comment
BRiT Posted September 1, 2011 Share Posted September 1, 2011 From a quick check, unRAID 5.0b12 uses sysklogd 1.4.1. Slackware 13.37 uses sysklogd 1.5.0. Link to comment
mbryanr Posted September 1, 2011 Share Posted September 1, 2011 Thanks for the response. No big deal I suppose, only one log entry and it operates perfectly. Link to comment
nojstevens Posted February 7, 2012 Share Posted February 7, 2012 Hello, I want to forward my syslog to IP 10.0.1.21 on UDP 514 - but reading this I am not totally clear on the steps. Do I create a startup script like weebotech? #!/bin/bash cp /boot/custom/etc/syslog.conf /etc/syslog.conf read PID < /var/run/syslogd.pid kill -1 ${PID} dmesg | logger -tdmesg -plocal7.info -i I can't see how this sends data to another IP? I think i am missing something? Jon Link to comment
dgaschk Posted February 7, 2012 Share Posted February 7, 2012 Hello, I want to forward my syslog to IP 10.0.1.21 on UDP 514 - but reading this I am not totally clear on the steps. Do I create a startup script like weebotech? #!/bin/bash cp /boot/custom/etc/syslog.conf /etc/syslog.conf read PID < /var/run/syslogd.pid kill -1 ${PID} dmesg | logger -tdmesg -plocal7.info -i I can't see how this sends data to another IP? I think i am missing something? Jon The IP address is in syslod.conf Link to comment
nojstevens Posted February 7, 2012 Share Posted February 7, 2012 Ah yes, i can see that now - the scroll bars don't appear on Lion. Thank you - startup script - where do I put it and what do I call it? Jon Link to comment
dgaschk Posted February 7, 2012 Share Posted February 7, 2012 It can go wherever you like, e.g., /boot/custom. It must be called from the go script or place the four lines in the go script. Link to comment
nojstevens Posted February 7, 2012 Share Posted February 7, 2012 Great - thanks - i've added it my go script and its working I appreciate your quick replies, thank you. Lots I can do with this syslog now in terms of email warnings etc Jon Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.