Streaming logs with Datadog IoT Agent

I have a multi-container project and I followed the instructions here to setup a datadog-iot agent.

I can see it sends some host metrics, but the logs tab is empty. What else do I need to do to set up logging?

I saw here the docs say I can use the Supervisor to forward logs to Datadog, but I couldn’t find an example of how to do that. Any help would be appreciated.

That’s Nice

I have not tried forwarding logs to Datadog. The Supervisor endpoint may be helpful [1]. Be sure to check the repository with an example of using it [2].

I also recently posted on use of OpenTelemetry with Prometheus [3]. The block/project I reference in that post also does not push logs. However, there is an OpenTelemetry journald receiver contribution, which should be usable [4]. It looks for journal files, which can be found under /run/log/journalon a balena device. If I were to experiment with logs, I would go down that path.

Notice that Datadog’s backend supports use of OpenTelemetry [5]. This wide vendor support is one of the main attractions of OpenTelemetry.

[1] Interacting with the balena Supervisor - Balena Documentation
[2] GitHub - balena-io-examples/device-cloud-logging: An example of using the journald log streaming endpoint on balena-supervisor
[3] OpenTelemetry for IoT Metrics
[4] https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/journaldreceiver
[5] OpenTelemetry in Datadog

1 Like