title | description | author | ms.service | services | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|
Azure IoT Hub migrate to diagnostics settings | Microsoft Docs |
How to update Azure IoT Hub to use Azure diagnostics settings instead of operations monitoring to monitor the status of operations on your IoT hub in real time. |
kgremban |
iot-hub |
iot-hub |
conceptual |
11/19/2018 |
kgremban |
Customers using operations monitoring to track the status of operations in IoT Hub can migrate that workflow to Azure diagnostics settings, a feature of Azure Monitor. Diagnostics settings supply resource-level diagnostic information for many Azure services.
The operations monitoring functionality of IoT Hub is deprecated, and will be removed in the future. This article provides steps to move your workloads from operations monitoring to diagnostics settings. For more information about the deprecation timeline, see Monitor your Azure IoT solutions with Azure Monitor and Azure Resource Health.
To update your IoT Hub in the Azure portal, first turn on diagnostics settings, then turn off operations monitoring.
[!INCLUDE iot-hub-diagnostics-settings]
Once you have tested the new diagnostics settings on your workflow, you can turn off the operations monitoring feature.
-
In your IoT Hub menu, select Operations monitoring.
-
Under each monitoring category, select None.
-
Save the operations monitoring changes.
The schemas for operations monitoring and diagnostics settings vary slightly. It's important that you update the applications that use operations monitoring today to map to the schema used by diagnostics settings.
Also, diagnostics settings offers tracking for five new categories. After you update applications for the existing schema, add the new categories as well:
- Cloud-to-device twin operations
- Device-to-cloud twin operations
- Twin queries
- Jobs operations
- Direct Methods
For the specific schema structures, see Understand the schema for diagnostics settings.
To monitor device connect and disconnect events, we recommend subscribing to the device disconnected event on Event Grid to get alerts and monitor the device connection state. Use this tutorial to learn how to integrate Device Connected and Device Disconnected events from IoT Hub in your IoT solution.