You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/monitor-device-connection-state.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: kgremban
5
5
ms.author: kgremban
6
6
ms.topic: reference
7
7
ms.service: iot-hub
8
-
ms.date: 09/13/2022
8
+
ms.date: 10/18/2022
9
9
---
10
10
11
11
# Monitor device status
@@ -20,7 +20,9 @@ The following table introduces three ways to monitor your device connection stat
20
20
| Event Grid | 60 seconds | Low | Low |
21
21
| Custom device heartbeat pattern | Custom | High | High |
22
22
23
-
Because of its reliability, low cost, and ease of use we recommend Event Grid as the preferred monitoring solution for most customers. However, there are certain limitations to monitoring with Event Grid that may disqualify it for some IoT solutions. Use this article to understand the benefits and limitations of each option.
23
+
Because of its reliability, low cost, and ease of use we recommend Event Grid as the preferred monitoring solution for most customers.
24
+
25
+
However, there are certain limitations to monitoring with Event Grid that may disqualify it for some IoT solutions. Use this article to understand the benefits and limitations of each option.
24
26
25
27
## Device twin connectionState
26
28
@@ -35,7 +37,9 @@ For these reasons, we recommend that you only use the **connectionState** field
35
37
36
38
## Event Grid
37
39
38
-
We recommend subscribing to the **deviceConnected** and **deviceDisconnected** events on Event Grid to get alerts and monitor the device connection state.
40
+
We recommend Event Grid as the preferred monitoring solution for most customers.
41
+
42
+
Subscribe to the **deviceConnected** and **deviceDisconnected** events on Event Grid to get alerts and monitor the device connection state.
39
43
40
44
Use the following articles to learn how to integrate device connected and disconnected events in your IoT solution:
41
45
@@ -47,8 +51,7 @@ Device connection state events are available for devices connecting using either
47
51
* For devices connecting using the Azure IoT SDKs for Java, Node, or Python:
48
52
* MQTT: connection state events are sent automatically.
49
53
* AMQP: a [cloud-to-device link](iot-hub-amqp-support.md#invoke-cloud-to-device-messages-service-client) should be created to reduce delays in reporting connection states.
50
-
* For devices connecting using the .NET SDK, connection state events won't be reported until an initial device-to-cloud message is sent or a cloud-to-device message is received.
51
-
* For devices connecting using the C SDK, connection state events won't be reported.
54
+
* For devices connecting using the Azure IoT SDKs for .NET or C, connection state events won't be reported until an initial device-to-cloud message is sent or a cloud-to-device message is received.
52
55
53
56
Outside of the Azure IoT SDKs, in MQTT these operations equate to SUBSCRIBE or PUBLISH operations on the appropriate messaging topics. Over AMQP these operations equate to attaching or transferring a message on the appropriate link paths.
54
57
@@ -63,7 +66,7 @@ Using Event Grid to monitor your device status comes with the following limitati
63
66
* The IoT C SDK doesn't have a connect method. Customers must send telemetry to begin reporting accurate device connection states.
64
67
* Event Grid exposes a public endpoint that can't be hidden.
65
68
66
-
If any of these limitations impact your ability to use Event Grid for device status monitoring, then you should consider building a custom device heartbeat pattern instead.
69
+
If any of these limitations affect your ability to use Event Grid for device status monitoring, then you should consider building a custom device heartbeat pattern instead.
67
70
68
71
## Device heartbeat
69
72
@@ -76,7 +79,8 @@ If you need to know the connection state of your devices but the limitations of
76
79
77
80
Since heartbeat messages are implemented as device-to-cloud messages, they count against your [IoT Hub message quota and throttling limits](iot-hub-devguide-quotas-throttling.md).
78
81
79
-
## Additional monitoring options
82
+
## Other monitoring options
80
83
81
-
A more complex implementation could include the information from [Azure Monitor](../azure-monitor/index.yml) and [Azure Resource Health](../service-health/resource-health-overview.md) to identify devices that are trying to connect or communicate but failing. To learn more about using these services with IoT Hub, see [Monitor IoT Hub](monitor-iot-hub.md) and [Check IoT Hub resource health](iot-hub-azure-service-health-integration.md#check-health-of-an-iot-hub-with-azure-resource-health). For more specific information about using Azure Monitor or Event Grid to monitor device connectivity, see [Monitor, diagnose, and troubleshoot device connectivity](iot-hub-troubleshoot-connectivity.md).
84
+
A more complex implementation could include the information from [Azure Monitor](../azure-monitor/index.yml) and [Azure Resource Health](../service-health/resource-health-overview.md) to identify devices that are trying to connect or communicate but failing. Azure Monitor dashboards are helpful for seeing the aggregate health of your devices, while Event Grid and heartbeat patterns make it easier to respond to individual device outages.
82
85
86
+
To learn more about using these services with IoT Hub, see [Monitor IoT Hub](monitor-iot-hub.md) and [Check IoT Hub resource health](iot-hub-azure-service-health-integration.md#check-health-of-an-iot-hub-with-azure-resource-health). For more specific information about using Azure Monitor or Event Grid to monitor device connectivity, see [Monitor, diagnose, and troubleshoot device connectivity](iot-hub-troubleshoot-connectivity.md).
0 commit comments