- Lab
- A Cloud Guru
Monitor and Troubleshoot an IoT Solution
In this lab, you start out with a predeployed IoT solution based on Azure IoT Hub. Unfortunately, the solution includes several incorrect configurations and bugs that not only prevent you from accessing key components, but also prevent telemetry from flowing properly from your IoT device to the desired destinations in the solution. In order to complete this lab, you will need to conduct root-cause analysis and apply changes to the hub infrastructure in order to create a working IoT solution. All work takes place in the Azure portal and assumes you know the basics of portal navigation. ### Prerequisites Before taking on this lab, you should have a pretty solid understanding of Azure IoT Hub infrastructure and device management, as well as familiarity with telemetry routing and Event Grid.
Path Info
Table of Contents
-
Challenge
Create and Connect a Simulated Device to Azure IoT Hub
- Log in to the Azure portal using the lab credentials in an InPrivate or incognito window.
- Navigate to the only IoT Hub already deployed in the lab subscription.
- Attempt to create a new device. You will be blocked from the device explorer, and you will need to identify the source of the problem. There will be a pop-up message on the screen providing you with a hint of what needs to be fixed before you can access the device registry. If you missed the pop-up, select "Retry" to view it. Your first troubleshooting task is to resolve this problem.
- Once you have applied the fix, create a new device, and copy the Primary Connection String.
- Use this link to open the device simulator in a new browser tab or window.
- In the code pane, find and modify the connection string using the Primary Connection String you copied from the new device registration.
- Run the code and confirm that the device is sending telemetry data.
- Let the code continue to run, and return to the Azure portal to verify that data is flowing to the hub.
-
Challenge
Identify and Fix Problem with Data Flow to the Storage Queue
- Once you have verified that data is flowing to the hub, confirm that an Event Grid topic and subscription are integrated with the hub.
- Navigate to the storage queue to check the flow of data. You should confirm that no data is flowing through the Event Grid subscription to the queue. This is your next troubleshooting challenge.
- Identify the root cause(s) of this problem and apply the fixes.
- Verify that data is flowing to the storage queue. You may need to wait a few minutes and refresh to see data arriving.
-
Challenge
Identify and Fix Problem with Data Flow to the Blob Container
- Once you have verified that data is flowing to the hub, confirm that a custom route, with a storage endpoint, is defined on the hub. (Ignore the other route created by Event Grid.)
- Navigate to the Blob Storage container called iot-device-telemetry to check the flow of data. You should confirm that no data is flowing through the hub message route to the blob container. This is your final troubleshooting challenge.
- Identify the root cause(s) of this problem and apply the fixes.
- Verify that data is flowing to the storage queue. You may need to wait a few minutes and refresh to see data arriving.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.