Azure / iotedge

The IoT Edge OSS project
MIT License
1.45k stars 458 forks source link

AzureSecurityCenterforIoT failed on IotEdge #6320

Closed vaishnavils97 closed 2 years ago

vaishnavils97 commented 2 years ago

Hi Team, I have installed IoTEdge on Linux VM and tried to run Simulated Temperature Sensor(MarketPlace Module) and AzureSecurityCenterforIoT(MarketPlace module) for sending data to IOTCentral. But getting error for AzureSecurityCenterforIoT module. I am using Linux VM with Ubuntu 20.04 uname -a > 26~20.04.1-Ubuntu SMP Thu Apr 7 19:42:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Docker version: Docker version 20.10.14+azure-1,

Below is the error from the AzureSecurityCenterforIoT:

Process exited with error: /bin/bash -c "chroot /host docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' edgeHub", exitcode=125, message=chroot: cannot change root directory to '/host': No such file or directory. Fatal: An exception was not handled : Microsoft.Azure.IoT.Agent.Core.Exceptions.CommandExecutionFailedException: the command [/bin/bash -c "chroot /host docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' edgeHub"] exited with code [125] and an error of [chroot: cannot change root directory to '/host': No such file or directory

Please suggest a solution for this issue, any update on deployment.template.json file for AzureSecurityCenterforIoT Module ?

gordonwang0 commented 2 years ago

This seems to be a problem with the ASC module, not Edge.

@veyalla Please redirect.

veyalla commented 2 years ago

The IoT Edge module for Azure Security Center is deprecated. Please use IoT Defender Micro-agent - https://docs.microsoft.com/azure/defender-for-iot/device-builders/tutorial-standalone-agent-binary-installation

vaishnavils97 commented 2 years ago

Thanks, @veyalla! Is it Possible to configure the IoT Defender Micro-agent with IOTCentral Instead of IoTHub? And also the DefenderIotMicroAgent Module is available in MarketPlace?. Can you please provide the details on the connection string for connecting the IoT Defender Micro-agent to IoT central, I could not get much documentation on this part. Kindly provide your suggestions.

veyalla commented 2 years ago

Please ask in the IoT Central Microsoft Q&A forum: https://docs.microsoft.com/en-us/answers/topics/25492/azure-iot-central.html

vaishnavils97 commented 2 years ago

Sure, I will connect with the IoTCentral support Forum. But Can you please give information on whether DefenderIotMicroAgent Module is supported by azure IoTEdge

veyalla commented 2 years ago

IoT Edge v1.2+ and Defender for IoT micro agent can co-exist on the same device but the micro agent cannot be managed by IoT Edge in the same way an IoT Edge module is. Unlike IoT Edge modules, the micro agent is a native host-level component rather than a containerized module.