I use InfluxDB v2.1.1 and Grafana v8.4 in docker. Sensors data are pushed from an embedded electronic module. I use a C# Influxdb client with the line protocol.
I can refresh the dashboard every 5s and see the new data from InfluxDB.
What is the best solution to get a “live stream” the sensors data from InfluxDB ?
Could you say me what tools/plugins I need to use to achieve the live streaming from InfluxDB to Grafana ? I’m novice and there are a lot of plugins, so if you could enumerate all tools I need then I can learn the right ones.
From your previous answer the telegraph is needed I guess. So InfluxDB, Grafana, telegraph and …?
From my PLC I send sensor measurements to InfluxDB, then I connect Grafana to show data at 5s refresh rate. What is the best plug-ins or tools to view in “live” the data ?
I do that exact thing…store the data in InfluxDB and stream the data live via MQTT. I set up each of my Grafana panels to use one of these 2 data sources.
My signal chain looks like this:
device sends data (e.g. thermocouple, RS232 device, Modbus data, etc.) is received via Node-RED. There are thousands of Nodes and it’s easy to get going. Their forums are great too.
Node-RED publishes data to InfluxDB (say, once a minute) and simultaneously sends data (say, once a second) to an MQTT broker.
Grafana’s datasources are set up with InfluxDB and MQTT. Select the source and you can see the data (historical, i.e. Influx or live, i.e. MQTT).
Yes, InfluxDB and Grafana should be able to subscribe to the same MQTT broker so long as you use a plugin like this…The MQTT Consumer Telegraf Input Plugin reads from specified MQTT topics and adds messages to InfluxDB. Messages are in the Telegraf input data formats. This plugin reads from specified MQTT topics and adds messages to InfluxDB. The plugin expects messages in the Telegraf Input Data Formats.
All parts are working well except the Grafana MQTT plugin.
I use Docker desktop for Windows, all containers (Mosquitto, Telegraf, InfluxDB, Grafana) are working well :
My C# application publish data in format “InfluxDB line protocol” to the Mosquitto Broker
Telegraf subscribes to the Mosquitto Broker and it send data to the InfluxDB.
The missing part is: how to get the MQTT plugin working in Grafana in my docker ?
Installing the MQTT datasource plugin was not a straightforward exercise for me. I understand nothing about Go, Mage, etc and had to seek help on this forum to get it done.
If you have not already searched and/or posted, please do so and I am sure you can get it installed on Docker.