Balena System Logs collection - journalctl & dmesg

Hi,

We are looking to collect OS data from our devices on the fleet so we can better troubleshoot and understand failures.

Some of the tools used for this are journalctl and dmesg. Is there a way to collect them either using Balena tools like CLI or SDK, or using the containers interaction with Supervisor, or any other approach?

Regards,

Hello, you can currently use the API (or the SDKs) to get device state/status, plus CPU, memory and disk numbers. Beyond that, you would need to deploy a container into your app to specifically collect metrics/logs of interest and store/forward them somewhere for analysis (i.e. Splunk, DataDog, etc.). Open source solutions like Prometheus is also a good option and we have some existing projects that you can use for inspiration.