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?
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:
Reference:
Yes, the query will help to localize the error.
The query filters the Azure Diagnostic logs based on the ResourceType, Category, and Level of the logs.
The ResourceType is set to IOTHUBS, which means that the logs are specific to IoT Hubs. The Category is set to Connections, which means that the logs are related to connection issues. The Level is set to Error, which means that the logs indicate errors.
By applying this filter, the query returns logs related to errors in the IoT Hub connections. This can be useful for identifying any issues related to the connection between the temperature sensors and the IoT Hub.
By analyzing the logs, it is possible to determine the cause of the errors and take appropriate actions to fix the issue. In this case, if the temperature sensors cease to send telemetry in the morning hours, the logs can help to identify any issues related to connectivity during that time period. This can help to localize the error and take steps to fix it, such as upgrading the firmware on the temperature sensors, replacing faulty hardware, or optimizing the network connectivity.