Guide: How to log to Synology

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Holland
Posts: 179
Joined: Friday 12 July 2013 13:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta Ch
Location: The Netherlands
Contact:

Guide: How to log to Synology

Post 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
annefmoreno
Posts: 5
Joined: Friday 22 April 2016 12:18
Target OS: Windows
Domoticz version:
Contact:

Re: Guide: How to log to Synology

Post 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.
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: Guide: How to log to Synology

Post 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
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Guide: How to log to Synology

Post 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
niclasc
Posts: 28
Joined: Wednesday 09 December 2015 17:04
Target OS: Linux
Domoticz version: 4.10854
Location: Sweden
Contact:

Re: Guide: How to log to Synology

Post 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
nono212
Posts: 39
Joined: Sunday 18 December 2016 13:47
Target OS: Linux
Domoticz version: 3.6179
Contact:

Re: Guide: How to log to Synology

Post 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?
janvdpol
Posts: 7
Joined: Saturday 29 December 2018 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Guide: How to log to Synology

Post 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
whoami
Posts: 73
Joined: Tuesday 31 March 2020 22:31
Target OS: -
Domoticz version:
Location: Dutch
Contact:

Re: Guide: How to log to Synology

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest