Hardware: CPUArchitecture/RAM/storage Raspberry Pi 4
OS: what OS is used and which version Raspbian OS 64 bit Bullseye
openHAB version: 4.0.4
Issue of the topic: Openhab container crashes daily, i guess since the update to 4.0.4
Hello together,
for a long time im running openhab within a docker container. Since update 4.0.4 the container crashes daily.
Luckily i have a lot of logging information but unfortunately the log of the container itself is missing. I would like to add these logs to Grafana to go on with the analyzation but i dont know how. Im also using portainer but here i only get a short time information of the container.
Any ideas?
What i found out so far for latest crash:
I startet with the openhab event log, here i found that the last entry was at 2023-12-02 00:21:03.213. After that nothing until restart in the morning.
So i went on the raspberry pi syslog and found a little bit earlier some health check errors for the openhab container. From here on i need further information.
Maybe I’m completely off base but does Grafana even do that? That’s what folks like Chronograf, Spelunk, Graylog, etc are for. Grafana is to plot time series data (unless you are talking about Grafana Cloud Log but if that’s the case you are not running this locally).
Any log analysis approach requires two parts and often there are separate products for each part. First there is log aggregation which collects the logs and moves them to a central repository. Examples of this include Prometheus, Grafana Loki, etc. The second part is the analysis tools that process the aggregated logs.
To answer this question you need to decide on an analyst tool and use what ever that took is compatible with to connect the logs. If you are using Grafana Cloud Log you’d use Grafana Loki.
You are only going to get the information that is already configured to be logged. If you want more from Docker, you’ll need to go to the Docker docs and forums to figure it how to have it generate more logging.
All of this is outside the scope of OH really so you will get better support from other forums closer to what your are trying to do (e.g. the Grafana forums).
There is a Docker driver client which ships all container logs to loki but its too hard for me to make it run on a raspberry pi. So my hope was there is an similiar easy way.
Maybe the information already logged is enough but i can only see a short time within portainer.
Then I will go to research how to get the logs to understand the cause for the crash. Thanks for your response.