Azure IoT Hub Logs broken for new IoT Hub

Timo 20 Reputation points
2023-06-02T09:24:32.4233333+00:00

I have recently created a new IoT Hub using the Azure Portal and followed the same steps that I have previously successfully followed to obtain log information in another IoT Hub, namely:

  • Create new Diagnostic Settings, ticking "allLogs", "audit", "AllMetrics" and "Send to Log Analytics workspace", selection the same Log Analytics workspace that I'm using for my other IoT Hub.
  • Connect some devices
  • Set the correct timezone under "Logs"
  • Query "AzureActivity" or "AzureDiagnostics" under "Logs"

However, even after all this, the no log results are found!

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,157 questions
{count} votes

Accepted answer
  1. AshokPeddakotla-MSFT 30,511 Reputation points
    2023-06-05T05:43:46.6933333+00:00

    @Timo Greetings!

    • Create new Diagnostic Settings, ticking "allLogs", "audit", "AllMetrics" and "Send to Log Analytics workspace", selection the same Log Analytics workspace that I'm using for my other IoT Hub.
    • Connect some devices
    • Set the correct timezone under "Logs" Query "AzureActivity" or "AzureDiagnostics" under "Logs" However, even after all this, the no log results are found!

    I understand that you have followed the above steps. Did you get a chance to see suggestions from VasimTamboli?

    There could be several reasons why you're not seeing any logs. Here are some things you can check:

    1. Check if there are any filters applied to the query. If there are filters applied, it may be excluding the logs you're looking for.
    2. Ensure that the correct time range is selected in the Log Analytics workspace. If the time range is set to a period where there is no data, you won't see any logs.
    3. Verify that the devices are sending telemetry data to the IoT Hub. You can check this by running a query for the device telemetry data in the Log Analytics workspace.
    4. Check if there is any delay in the log data ingestion. It may take several minutes for the logs to appear in the Log Analytics workspace after you have created the diagnostic settings.

    Hope this helps. Do let us know if that helps to identify the root cause or have any further queries.


0 additional answers

Sort by: Most helpful