Hello @Abigail Greentree
To check if the Azure Device Update agent has successfully connected to the hub, you can use the following steps:
- Log in to the machine or device that has the Device Update agent installed.
- Open a Terminal window, and enter the command below to check the status of the agent:
shell sudo systemctl status deviceupdate-agent
If the agent is running successfully, you should see status OK. - You can also check the diagnostics tab of Device Update in the Azure portal to view the health of your devices. In the Azure portal, navigate to your IoT hub, select Updates from the navigation menu, then select the Diagnostics tab. Expand the Find missing devices section to view the results of agent check.
Regarding your fallback strategy, you can confirm that the ADU agent has re-established a connection with IoT Hub before an update is considered successful by checking the status of the agent using the above steps after the update has been applied. If the agent is running successfully, it means that the ADU agent has re-established a connection with IoT Hub and the update is considered successful. Running /usr/bin/AducIotAgent --health-check
may not work for this use case because it only checks if the agent starts and can retrieve a connection string but does not confirm a connection can be made.
I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.