应用程序洞察监控物联网边缘(即Docker容器)

时间:2018-04-11 08:54:19

标签: docker azure-application-insights docker-windows azure-iot-edge

我实现了一些IoT Edge模块,这些模块在Docker容器中运行,我希望使用Azure Application Insights监控它们。 我尝试下载适用于Application Insights的Docker Image,但它没有工作,因为它看起来应用程序是为Linux构建的,而是我有一个Windows主机。 这是错误:

>docker pull microsoft/applicationinsights
Using default tag: latest
latest: Pulling from microsoft/applicationinsights
03e1855d4f31: Extracting [==================================================>]  51.36MB/51.36MB
a3ed95caeb02: Download complete
9269ba3950bb: Download complete
6ecee6444751: Download complete
5b865d39f77d: Download complete
e7e5c0273866: Download complete
6a4effbc4451: Download complete
0ca84c702ddf: Download complete
f65c3d129381: Download complete
ef589ca5832a: Download complete
09284c30e414: Download complete
failed to register layer: re-exec error: exit status 1: output: Failed to OpenForBackup failed in Win32: open \\?\C:\ProgramData\docker\windowsfilter\a3b784c3d8da4c4eeca6b42111df7ddc25db2e134b9c655483a7bb144c6fc905\usr\share\man\man3\Locale::gettext.3pm.gz: 
The filename, directory name, or volume label syntax is incorrect. (0x1f) \\?\C:\ProgramData\docker\windowsfilter\a3b784c3d8da4c4eeca6b42111df7ddc25db2e134b9c655483a7bb144c6fc905\usr\share\man\man3\Locale::gettext.3pm.gz

您知道Windows是否存在图像?

更新 我尝试使用PerformanceCollectorModule来收集性能,但没有运气,因为似乎CPU和内存指标不是来自.NET核心模块的supported
最后我尝试使用System.Diagnostics.PerformanceCounter库,但我的容器无权读取这些指标。虽然我尝试将Authenticated Users组添加到Performance Monitor Users和Performance Log Users组。

Unhandled Exception: System.AggregateException: One or more errors occurred. (Access to the registry key 'Global' is denied.) ---> 
System.UnauthorizedAccessException: Access to the registry key 'Global' is denied.

在Application Insights中不存在监视IoT Edge模块的任何其他方法吗?

1 个答案:

答案 0 :(得分:0)

我跟着" Monitor Docker applications in Application Insights"教程并获得我的边缘docker容器主机性能如下:

enter image description here

我的设置:

主机:Windows 10桌面

Docker Engine:Docker for Windows

Docker镜像:Application Insights图像和Azure IoT Edge

启动AI图像" Run the Application Insights monitor on your host"。

启动IoT Edge后跟" Deploy your first IoT Edge module from the Azure portal to a Windows device"。

你可以试试看它是否有帮助。