Page 1 of 1

Guide: How to log to Synology

Posted: Sunday 17 April 2016 22:48
by Holland
Please find below a few steps to get logging to the loggingcenter of a Synology working. It's pretty simple, it just takes 3 steps. I know there are a few wiki's already created for this purpose, but I could not make it work using those wiki''s. So maybe the below is helpful for someone;

1. Check if the Log Center is installed on the NAS.
2. At the following line to the Domoticz startup script, and restart Domoticz : /etc/init.d/domoticz.sh


DAEMON_ARGS="-loglevel 0 -syslog local1 -daemon -www 8080"

My daemon section looks like this, changed are marked bold;


DAEMON=/home/$USERNAME/domoticz/$NAME
#DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
#DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
DAEMON_ARGS="-loglevel 0 -syslog local1 -daemon -www 8080"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"

3. Make a change in the rsyslog service config file

Jump to /etc/
And edit rsyslog.conf

add the following just above the Global Directives section, where ip is the ip of the Synology. After the below is added restart the rsys service, and have a look on you NAS, info should flow in already. That's all!

*.* @ip:514

Re: Guide: How to log to Synology

Posted: Saturday 23 April 2016 7:20
by annefmoreno
Synology is a Taiwanese corporation that specializes in network attached storage (NAS) appliances. Synology’s line of NAS are known as the DiskStation for desktop models, and RackStation for rack-mount models. Synology's products are distributed worldwide and localized in several languages. Synology's headquarters are located in Taipei, Taiwan with subsidiaries located around the world.

Re: Guide: How to log to Synology

Posted: Saturday 23 April 2016 7:44
by woody4165
Hi

nice info.

Just tried also on another NAS brand and it's working.

What if the NAS is down for any reason, just loose the log or is there any issue?

Thanks

Re: Guide: How to log to Synology

Posted: Friday 12 August 2016 8:11
by jannl
Just came across this post via another thread.

Remember the loglevel line in the example is only present for now in the beta!!

And as as for me, in the latest stable not much logging is send to my Synology NAS

Re: Guide: How to log to Synology

Posted: Wednesday 30 August 2017 17:55
by niclasc
Sorry to dig up this old thread. But I have followed this guide to set up logging to my synology but nothing shows up.

I've added this to rsyslog.conf
*.* @192.168.1.10:514

Have this in domoticz.sh
DAEMON=/home/$USERNAME/domoticz/$NAME
#DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
#DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
DAEMON_ARGS="-loglevel 0 -syslog local1 -daemon -www 8080"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"

And have my synology log center set up with:
BSD format settings
TCP and port 514

Domoticz is v3.8342

Re: Guide: How to log to Synology

Posted: Wednesday 03 October 2018 18:00
by nono212
Hello
I have Domoticz with Jahdal image and I want the domoticz.log to be sent to the log server of Synology is it possible?

Re: Guide: How to log to Synology

Posted: Sunday 03 April 2022 16:51
by janvdpol
When using TCP you need to use two '@' in /etc/rsyslog.conf. For UDP a single '@' suffices.

So it would become in case of UDP: *.* @ip:514
And in case of TCP: *.* @@ip:514

Re: Guide: How to log to Synology

Posted: Sunday 09 October 2022 14:03
by whoami
I also want to use the Logcenter of Synology, but where is the file that I have to edit with the correct ipadres?

Is there not just a screen in domoticz itself where you can set this?