I would like to be able to get the logs from the 4 containers installed in my raspberry pi and send them to grafana loki, for that I was trying to install promtail in the balena host but I cannot as the balena host doesn’t have most of the command required (and libraries) to install promtail.
I also though of installing promtail inside the raspberry pi host (not the balena host) but I cannot access to the logs from there.
Do you know how could I install promtail or even any other client to be able to send the logs to grafana loki (Clients | Grafana Labs)?
for getting already some context. Why would you like to have the logs in a custom log backend like loki?
For the moment, the approach to install or add a service to the balenaOS is not working. It’s intended to not extend the balenaOS in this way. The way to go will be to add a parallel service that scrapes the logs from the containers and can send them to a log backend.
I’m going to comprehend these inputs and maybe you can already have a look at them, too:
Another way could be to utilise the approach of using fluentd service integration.
I just wanted to have all the logs from the different services/projects I have in my home and have them with centralized logging and monitoring.
At the end what I did was create a service which connects to balena and reads all the logs send to balena and with promtail get the logs from that service and send it to loki.
For posterity, for anyone who want to collect logs, they can use this supervisor endpoint and then send to other services or store locally depending on their use case