I was hoping to send all my logs for supervisor, HA and all my addons to Loki. Then I could add that as a data source in Grafana and use that for analyzing and monitoring my logs. But I ran into a major challenge with this. There’s really no way to actually get to the logs for any of the containers besides homeassistant (and that’s only because it logs to disk in
It looks like HA OS is set up to use journald by default. So the logs are on the host under
/var/log/journal but that’s inaccessible in HA OS. Besides the preferred way to collect these logs would be to install a logging driver plugin. Grafana provides one for Loki called Promtail, you configure it as described here. There’s other alternative options as well like Fluentd and Fluentbit that provide their own logging plugins for docker.
I tried installing Promtail as the default logging driver to see what happened in a test system. It put it in a permanent bootloop and bricked it so clearly this isn’t supported right now. Would be great if it was possible to use a different logging driver to send logs off to an external aggregator for analysis and monitoring.