Visualize IoT data dynamically through live dashboards

Visualize IoT data dynamically through live dashboards

This post is part 4 of the IoT messaging series

Parties in this series:

  1. Part 1 – Introduction
  2. Part 2 – Understanding the protocols behind IoT messaging
  3. Part 3 – Building real-time IoT dashboards with LavinMQ and WebSockets
  4. Part 4 – Visualizing IoT data dynamically through live dashboards (you are here)
  5. Part 5 – Securing and scaling IoT systems for reliability and performance

In the previous post , we explored how LavinMQ enables real-time messaging between IoT devices and dashboards using WebSockets. That setup provides instant, event-driven updates, ideal for live dashboards and immediate visibility.

Now it’s time to take the next step:

Turning continuous real-time data into long-term, meaningful insights using LavinMQ message broker, monitoring tool Prometheus, and analytics platform Grafana.

Why visualization matters

In IoT systems with hundreds or thousands of sensors, real-time updates alone are not enough. You also need to understand how data changes over time, not just what is happening at the moment.

For example:

  • How does temperature change over the day or week?
  • Are some devices reporting more frequently than others?
  • Did message throughput drop after a firmware update or configuration change?
  • Is your broker approaching capacity?

Visualization helps you spot patterns and detect issues early. Something helpful if you want to make informed decisions quickly.

When it comes to LavinMQ's management UI, it works well for monitoring current activity, such as queue depth, message rates, and connections. However, the UI alone doesn't store metrics long-term or send alerts when consumers go offline or if queues fill up. You also can't use it to analyze historical trends, like checking yesterday's publish rate.

Understanding how IoT message spikes affect the broker would need a custom dashboard, and luckily, there are great tools for this. To monitor these aspects, LavinMQ includes a Prometheus metrics endpoint that exposes broker metrics for scraping.

Prometheus and Grafana: the perfect match for IoT observability

Prometheus is an open-source monitoring and alerting system built for large-scale monitoring. It automatically scrapes metrics from your services, stores them as time-series data, and lets you query everything efficiently using the Prometheus query language (PromQL). It also powers alerting based on rules you define, making it ideal for real-time operational insight.

LavinMQ exposes all its internal metrics through a /metrics endpoint, which means Prometheus can continuously collect details such as message rates, queue sizes, producer/consumer activity, throughput, and even system-level stats like CPU, memory usage, and latency.

Once the metrics are collected, Grafana an open-source visualization tool, takes over for visualization. Instead of scrolling through raw numbers, Grafana lets you build interactive dashboards that combine real-time charts, historical graphs, and alert overviews. You can even correlate LavinMQ data with other sources in the same view, creating a unified monitoring experience for IoT systems.

Combining these three tools turns your IoT messaging pipeline into a complete observability system.

High-level architecture:

IoT to LavinMQ flow diagram

Let’s break it down clearly:

IoT devices → LavinMQ

Devices publish telemetry data using AMQP or MQTT. LavinMQ routes messages to queues in real time.

LavinMQ → Prometheus

LavinMQ exposes its internal metrics at a dedicated /metrics endpoint. Prometheus scrapes this endpoint at regular intervals (e.g., every 10 seconds) and stores the data.

Prometheus → Grafana

Grafana queries Prometheus and visualizes the metrics through dashboards and alerts. With these metrics, you can:

  • Track how message throughput changes over time
  • Detect bottlenecks or overloaded queues
  • Compare device activity across time windows
  • Monitor the health of your message broker
  • Build alerts
  • Combine IoT metrics with infrastructure metrics

This gives you full end-to-end observability.

How to set up an IoT observability system in practice

If you would like to try this setup. We have written a detailed guide here:

👉 IoT Data Pipeline: LavinMQ to Prometheus to Grafana

With this architecture in place, you have a complete pipeline for collecting, monitoring, and analyzing IoT activity - from live message flow to long-term performance trends.

Summary

Real-time messaging provides instant visibility, while Prometheus and Grafana deliver long-term, actionable insights. When you integrate LavinMQ with Prometheus and Grafana, you get a system that supports high-performance message delivery and also stores and analyzes metrics over time. Grafana then transforms these metrics into dynamic dashboards that highlight both real-time behavior and historical patterns.

Together, this combination gives you a fully observable IoT system that scales cleanly as your device count and data volume grow.

👉 Next up: Secure and scale IoT systems for reliability and performance

CloudAMQP - industry leading RabbitMQ as a service

Start your managed cluster today. CloudAMQP is 100% free to try.

13,000+ users including these smart companies