Using Grafana has been a fun experience! Wanting to use it for visualizing a couple of gauges, time series plots, tables and logs. All of these measurements flow-in at a high rate (20 strings, 100 floats at 30 Hz).
Such high bandwidth requirements made me search “websockets + grafana”, which returned this result. While most tutorials suggest connecting Grafana with InfluxDB, the method here seems to mock the influxDB line protocol so to be detected as a channel under the
Live Measurements query type, without explicitly adding InfluxDB as a
Data Source under
Configuration or even running a local instance of InfluxDB (i.e. streams the data directly and doesn’t seem to store it in a database).
Qn: The example works, but not sure if this is one of the recommended methods by Grafana? I already see that when sending multiple measurements, the new
channels take time/sometimes do not appear under the
Live Measurements query type.
Qn: Does mocking the line protocol and not using InfluxDB like it is meant to, make Grafana more likely to miss packets sent out especially at such high update rates?
Qn: InfluxDB/telegraf also hint being CPU intensive in such high bandwidth scenarios. Would the MQTT method suggested in grafana’s mqtt-datasource github repository be a better alternative then? Or any other data source recommendations? There is no requirement to store the incoming data in any way (similar to QOS of 0, I reckon?). But yet, willing to view a 20s history for time-series/log based panels.
Qn: If MQTT is recommended, does using it with Grafana impose any limits w.r.t. number of pubsub topics/payload size/refresh rates?
Posting one more question slightly unrelated to the ones above.
Qn: How can I automatically update the
units field of a time series graph? Is there a way to tap into this data by querying the
tag field in the line protocol described above or send this metadata with the MQTT ?
p.s.: Will use collapsible rows on the dashboard to limit the queries to this high b/w data.
Self hosted Grafana v.8.4.3, running on Windows 10