How to visualize data from iothub in grafana?

Sai Devaraj Manoharan 40 Reputation points
2023-12-20T12:36:47.8933333+00:00

Hi,

I'm currently working on azure iot hub, I have device in iothub which receives temperature data from esp32 in json format im able to receive it.

To visualize this data previously I used azure stream analytics and power bi

in stream analytics I assigned input as Iot Hub and for output as Power Bi

It worked well I'm able to visualize.

Now, I'm trying the same in grafana. But I'm unable to visualize it.

How to achieve this?

Initially In iothub->monitoring->diagnostics setting - created log analytics workspace but to go further I can't able to.

From grafana side configured and integrated azure monitor successfully. but I'm only able to view the metrics and logs related to azure system such as CPU utilization etc. I need to visualize my temperature data in grafana.

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,272 questions
Azure Managed Grafana
Azure Managed Grafana
An Azure service used to deploy Grafana dashboards for analytics and monitoring solutions.
134 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,971 Reputation points Moderator
    2023-12-20T13:25:37.6366667+00:00

    Sai Devaraj Manoharan Greetings!

    There is no direct way to connect Azure IoT Hub to a Grafana dashboard.

    You can connect Azure IoT Hub to Grafana dashboard through a VM running the Grafana website.

    First connect IoT Hub to Azure Stream analytics and Azure Stream analytics to Azure SQL database from an SQL database. Once data is available you can set it up to see it on a Grafana dashboard.

    For more details, please refer connect a Azure IoT hub to the VM running Grafana website and Supported Grafana data sources

    From grafana side configured and integrated azure monitor successfully. but I'm only able to view the metrics and logs related to azure system such as CPU utilization etc. I need to visualize my temperature data in grafana.

    Please check Monitor your Azure services in Grafana and see if it helps.

    Do let me know if that helps or have any further queries.

    2 people found this answer helpful.

  2. Daniel Maxwell 0 Reputation points
    2024-01-19T12:56:24.98+00:00

    The best way is to connect the Azure IoT Hub to Azure Data Explorer and then from there connect Azure Data Explorer to the Grafana ecosystem. We are successful with this and happy for the results. https://learn.microsoft.com/en-us/azure/data-explorer/create-iot-hub-connection https://learn.microsoft.com/en-us/azure/data-explorer/grafana

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.