是否有直接方法将容器日志从物联网边缘设备发送到Azure日志分析工作区? [英] Is there a direct way to send container logs to azure log analytics workspace from iot edge device?

查看:76
本文介绍了是否有直接方法将容器日志从物联网边缘设备发送到Azure日志分析工作区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种解决方案,以将在物联网边缘设备上生成的应用程序日志发送到azure日志分析工作区.

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

我尝试使用Microsoft Monitoring代理,通过它我可以发送通过运行Docker容器生成的日志.但是,在边缘设备上,我们使用的是Moby引擎而不是docker守护进程,因为哪个监视代理程序未收集日志记录(此设置可与docker一起运行-

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://docs.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/)

我正在寻找一种完全自动化的方法,将边缘设备上生成的应用程序日志流传输到Azure日志分析工作区.

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

推荐答案

到目前为止,还没有内置方法(可能值得在Github上与团队检查,因为他们可能会在路线图上找到它.)

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).

但是,您可以使用新的 log-pull功能:

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

  • 编写一个时间触发的小型Azure函数,该函数每隔几分钟就会提取一次您感兴趣的容器(或所有容器)的日志.日志将被写入存储帐户
  • 第二个Blob触发函数会拾取上载的日志,并将其发送到Log Analytics.

//一项非常新的功能(仍在Edge 1.0.9的候选版本中): https ://github.com/veyalla/ehm 这可能正是您要寻找的

// 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

这篇关于是否有直接方法将容器日志从物联网边缘设备发送到Azure日志分析工作区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆