Could someone please guide me on how I can stream the HA logs over to a central log server?
The options I can think of are…
Install rsyslog on the host OS and pass a path to the HA file, so that it can be streamed vis rsyslog. [X Not possible as HassOS doesn’t have a package manager to install rsyslog.]
Update the docker image for Home Assistant to include the following lines, so that a remote log server receives the docker logs at least. [X Not possible in HassOS as it only pulls the default HA dockerfile.]
My current workaround for some extensions is to install and enable portainer and configure the containers I’m interested on to use the gelf driver so I can send the logs to my graylog instance.
EDIT:
Oh dam, I spoke too soon, the portainer extension does not have access to the underliying containers (even in non protected mode) what a pitty.
EDIT2:
You need to unhide the containers on portainer settings. But in any case, adding the log configuration to each container not only does not scale, but gets reset on every update of the addon or home-assistant.
However, you can suck the logs by adding a container running a logging collector and give it access to docker.sock