Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Grot cannot remember your choice unless you click the consent notice at the bottom.

New in Grafana 8.0: Streaming real-time events and data to dashboards

New in Grafana 8.0: Streaming real-time events and data to dashboards

28 Jun, 2021 3 min

Grafana was made for large IT infrastructure projects, but a growing group of users rely on it for industrial/IoT projects, like monitoring physical equipment. And with good reason. According to Grafana Labs VP of Applications Ryan McKinley, “Software built by software engineers trying to know how their software is running is often nicer than industrial alternatives.” 

Some of the Grafana 8.0 updates were designed with industrial/IoT users in mind. In his GrafanaCONline presentation, “IoT in Grafana: Real-time streaming, new visualizations, and more, oh my!,” McKinley highlighted several of the features, including new visualizations and basic platform improvements that, he said, “make Grafana for non-IT ops more compelling.” 

The headline feature for IoT in Grafana 8.0 is Grafana Live, a core platform used to broadcast real-time events and data to dashboards. Streaming was a main feature of Grafana 7, but it was hard to use unless you wrote your own plugins and front end data sources. Now, it’s possible to stream data out of the box. “We can actually take an event in our backend infrastructure and broadcast it to everyone who’s listening at once,” McKinley explained. “In Grafana 7, everything needed to be pulled from the server, and in Grafana 8 we can push to all clients.” He called it a “foundational change” that will allow many new types of applications in the future.

McKinley gave an overview of how Grafana Live supports dashboard events by demonstrating how you can, for example, switch a color in a graph and the change will be broadcast to anyone who is looking at it. He also showed how moving cards on a Trello board in a plugin panel can also be seen live. 

He then went on to explain how to stream data out of sensors. 

In Grafana 8.0, there are two new ways to push data from sensors into Grafana: either using Grafana data source plugins or posting updates directly to the server over HTTP. McKinley discussed the new MQTT plugin — a widely-used protocol to broadcast events in IoT systems — then Software Engineer Atif Ali showed the live streaming in action, with a demo that took data from an accelerometer ⇒ MQTT ⇒ a Grafana dashboard.

That system is great, McKinley said, if you have a plugin that can read your data. But in most cases, that’s unlikely. 

“To make publishing data as easy as possible, we also exposed a raw HTTP and a WebSocket endpoint,” he explained. “This lets your applications directly push data to dashboards.” In this way, Grafana Live can essentially be treated as an InfluxDB server, and hook straight into Telegraf. Ali returned with another demo, this time pushing the data from his accelerometer ⇒ MQTT ⇒ Telegraf ⇒ a Grafana dashboard.  

McKinley ended with a preview of what’s coming in Grafana 8.1+, including the option of being able to stream to Grafana Cloud.To learn more about Grafana Live and more IoT-friendly features in Grafana 8.0 (including how it now supports Boolean values), watch the full presentation here.