Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a direct way to send container logs to azure log analytics workspace from iot edge device?

I am looking for a solution to send the application logs generated on iot edge devices to an azure log analytics workspace.

I have tried using the Microsoft Monitoring agent using which I was able to send logs generated by running docker containers. However, on an edge device, we are using the moby engine instead of the docker daemon because of which monitoring agent is not collecting the log records(followed this set up to run with docker - https://learn.microsoft.com/en-us/azure/azure-monitor/insights/containers#install-and-configure-windows-container-hosts). Moreover, since I am running my edge environment on windows, I didn't find any container image of monitoring agent targeted for windows.(present for Linux https://hub.docker.com/r/microsoft/oms/)

I am looking for a completely automated way of streaming application logs , generated on the edge device, to azure log analytics workspace.

like image 425
harika Avatar asked Oct 17 '25 09:10

harika


1 Answers

There is no built-in way as of today (might be worth checking with team on Github, as they might have this on the roadmap).

However, you can build your own solution using the new log-pull feature:

  • Write a small time-triggered Azure Function that pulls the logs every few minutes for the containers you are interested in (or all containers). The logs will be written to a storage account
  • A second blob-triggered Function picks up the uploaded logs and sends them into Log Analytics.

//Edit: Very new feature (still in Release Candidate for Edge 1.0.9): https://github.com/veyalla/ehm This might be exactly what you are looking for

like image 145
silent Avatar answered Oct 19 '25 23:10

silent



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!