I am using inject nodes to simulate a sensor which is producing messages to MQTT, then to Kafka, InfluxDB and finally Grafana. How do I determine how long a message from inject node takes to go through my system and output to a Grafana dashboard.
Thanks in advance,
Interesting question. I believe this is determined mostly by the polling period of grafana doing a query and how you do the display (again by a refresh timer?)
If not I would try to 1st record a timestamp at the first node. And set up a alarm in grafana (I played around only a little bit) and try to get this back into node-red to trigger a second timestamp.
What have you got the refresh period set to in the grafana dashboard? This is likely to be very much the largest time. The rest should be small fractions of a second generally, except that occasionally it may take a little longer due to nodejs garbage collection, and assuming that you are using a non realtime OS such as Raspbian then other things on the system may hold up node red.
Hey, thanks for your suggestion I will check it out now. Nice work!
I have the refresh set to 5 secs. That is the lowest option. Does Grafana query every 5 seconds and timestamp the points repectively?
The timestamps come from the data in the influx database.
As a matter of interest why are you using Kafka between mqtt and influx, you could write to influx directly from node-red. Or are the various components on different system.
Influx and grafana is more intended for historic data. Why not passing the data from mqtt to Node-Red and use linear gauge (vertical) for “real time” visualization of the most recent data. Place your grafana chart next to it for data older than 5 sec data. Or use the dashboard chart and grafana only for analysis.
I am using Kafka to send streams to different components. As it scales horizontally I thought it might be worth using. Especially, if I intend to extend it in future. I have a real-time stream and a offline stream which saves a back-up to Hadoop etc (I am only experimenting)
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.