Page 1 of 1

Domoticz, docker and syslog

Posted: Saturday 03 February 2024 16:09
by jannl
I recently changed my config from 'normal' to a docker config. On a Pi and still on buster (2022.2). Upgrade to bullseye and 2024.4 is planned.

Domoticz ran for years without crashing. Last night it crashed, the things I changed are the Domoticz version and the docker environment.

Before I logged everything to syslog on my Nas. In the docker container I didn't check if syslog was running, so when checking my logserver nothing was there. And I had to powercycle the Pi unfortunately. So nog logs.

Google so far did not learn me how to enable syslog for Domoticz in Docker.

Any tips?
EXTRA_CMD_ARG does not help so far.

Do I need to install syslog in the container?

Running on a pi 3b+.

Re: Domoticz, docker and syslog

Posted: Saturday 03 February 2024 20:13
by ferrosk
You can enable syslog driver for your domoticz container (add the options to docker run command or configure it in docker compose file), see https://docs.docker.com/config/containe ... ng/syslog/

I use the following configuration in my docker compose file to send logs from Domoticz container to remote syslog server:

Code: Select all

services:
  domoticz:
    container_name: domoticz
... 
    logging:
      driver: syslog
      options:
        syslog-address: tcp://<syslog-server-ip>:<port>
        syslog-format: rfc5424
        tag: domoticz

Re: Domoticz, docker and syslog

Posted: Monday 05 February 2024 11:41
by jannl
Thank, the solution I was looking for.