Detecting Connection Problems in Azure IoT Hub | Troubleshooting IoT Sensor Telemetry | Exam AZ-220

Diagnosing Connection Issues with Azure IoT Hub: Analyzing Resource Logs | Exam AZ-220

Question

You are operating an IoT solution of 1000 field devices.

After several weeks of operation, you notice that a certain group of temperature sensors cease to send telemetry in the morning hours.

You suspect that some kind of connection problems block messages and you decide to create a diagnostic setting in your IoT Hub, route the resource logs to Azure Monitor Logs, and analyze the log by running the following query:

AzureDiagnostics | where ( ResourceType == "IOTHUBS" and  Category == "Connections" and Level == "Error") 
Does it help you to localize the error?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

Correct Answer: A.

Option A is CORRECT because to find connection related error events in the log, the “Connections” diagnostic setting has to be configured (see below), and Category == “Connections” has to be used to filter the log entries.

Option B is incorrectbecause it is the “Connections” category that is used to track errors related to the connectivity of the devices.

Diagram:

Diagnostics setting & x

save X Discard te © Provide feedback

A diagnostic setting specifies a list of categories of platform logs and/or metrics that you want to collect from a resource, and
‘one or more destinations that you would stream them to. Normal usage charges for the destination will occur. Learn more
about the different log categories and contents of those logs

Diagnostic setting name * ‘Send connection events to logs v
Category details Destination details
log @ Send to Log Analytics
@ connections subscription
[internal use Vv]
( Devicetelemetry
Log Analytics workspace
[1] cz0cemmands [contoso-la-workspace27 124 ( westus ) Vv]
(L] Deviceldentityoperations (Archive to a storage account
LF Fiteuploadoperations 1 Stream to an event hub

1 routes

Reference:

Yes, analyzing the Azure Monitor Logs using the provided query can help localize the error in this scenario.

The query filters the logs from the AzureDiagnostics table and selects only those logs where the ResourceType is "IOTHUBS", the Category is "Connections", and the Level is "Error". This means that the query will return logs related to connection errors in the IoT Hub.

Since the issue at hand is suspected to be a connection problem, the query is expected to return logs related to the issue if it exists. Specifically, the query will return logs related to errors that occur when devices try to connect to the IoT Hub.

By analyzing these logs, it will be possible to determine the cause of the connection errors that prevent the temperature sensors from sending telemetry during the morning hours. This will enable the team to take corrective actions such as identifying and fixing the connection problems. Therefore, the provided query can help localize the error and solve the issue.