Azure IoT Device Connectivity Monitoring | Troubleshooting IoT Device Connectivity | Exam AZ-220

Azure IoT Device Connectivity Monitoring

Question

You have smart devices deployed around your IoT solution.

You need to monitor their operation health.

You experience that some of the devices have connectivity issues from time to time.

You know that the $edgeAgent contains health and connectivity data about the edge modules, therefore you start investigating the module twin of the device's edgeAgent:

{ "deviceId": "Windows004", "moduleId": "$edgeAgent", "etag": "AABBBBBAAAU=", "deviceEtag": "KzfgNjA5mDKz", "status": "enabled", "statusUpdateTime": "2020-01-01T00:00:00Z", "connectionState": "Disconnected", "lastActivityTime": "2020-01-01T00:00:00Z", "cloudToDeviceMessageCount": 0, "authenticationType": "sas", "x509Thumbprint": { "primaryThumbprint": null, "secondaryThumbprint": null }, "version": 14, "properties": { "desired": { "···" }, "reported": { "schemaVersion": "2.0", "version": { "···" }, "lastDesiredStatus": { "···" }, "runtime": { "···" }, "systemModules": { "edgeAgent": { "···" }, "edgeHub": { "···" } }, "lastDesiredVersion": 2, "modules": { "TemperatureSensor": { "···" } }, "$metadata": { "···" }, "$version": 22 } } } 
Does it help you investigate the problem?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

Correct Answer: B.

Option A is incorrect because while the edgeAgent is a good starting point to investigate the reason for connectivity issues in general, the given twin sample doesn't really help us.

You might think that the agent's “disconnected” state is the key but unfortunately, it is not.

You should check desired vs.

reported properties, and values like exitcode and lastExitTimeUtc etc.

to get closer to the solution.

Option B is CORRECT because while the “connectionState”: “Disconnected”, this is misleading because the connection state of the IoT Edge agent is always disconnected because this property refers to the device-to-cloud messages and the IoT Edge agent doesn't send messages to the cloud.

Therefore, the connection state of the edgeAgent itself has no clue for connectivity problems.

Reference:

Yes, the module twin of the device's $edgeAgent can provide useful information for investigating the connectivity issues of the smart device.

The module twin contains metadata and configuration information about the module. In this case, the module twin of the $edgeAgent provides the following information:

  • "deviceId": "Windows004": the ID of the device.
  • "moduleId": "$edgeAgent": the ID of the module. In this case, the $edgeAgent module.
  • "etag": "AABBBBBAAAU=": the entity tag (ETag) that is used for optimistic concurrency control.
  • "deviceEtag": "KzfgNjA5mDKz": the ETag of the device twin.
  • "status": "enabled": the status of the module.
  • "statusUpdateTime": "2020-01-01T00:00:00Z": the time when the status was last updated.
  • "connectionState": "Disconnected": the current connectivity state of the module.
  • "lastActivityTime": "2020-01-01T00:00:00Z": the time when the module last sent a message or received a message.
  • "cloudToDeviceMessageCount": 0: the number of messages waiting to be delivered to the module.
  • "authenticationType": "sas": the authentication type used for the module.
  • "x509Thumbprint": { "primaryThumbprint": null, "secondaryThumbprint": null }: the thumbprints of the X.509 certificates used for authentication.
  • "version": 14: the version of the module twin.
  • "properties": { ... }: the module twin properties, which include the desired and reported properties.

The reported properties include information about the module's health and connectivity. For example, the "connectionState" field indicates that the module is currently disconnected. This information can be used to investigate the connectivity issue and take appropriate actions to resolve it.

In summary, the module twin of the $edgeAgent provides valuable information for monitoring the operation health and connectivity of the smart devices in an IoT solution. Therefore, the answer is A. Yes, it helps to investigate the problem.