-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live data stops being showed #44
Comments
You may want to post your log from the time period where the graph goes from properly displaying the data to stopping. |
Same here: data limited to "last 1m", when display graph flickers and stops. Eventually, it will start again streaming live data a few seconds/minutes later. |
Also having this issue, any updates? |
I also see this behavior with a single topic |
Hi everyone ! I'm currently getting the same issue... Do you have some updates about it ? |
We also experiencing the same issue in 9.4.1, looks like its fixed in 9.4.3 |
I’m using 9.4.3 and I still experience the issue |
How long does it take for you before the issue occur for you? |
In my testing it only worked for about a minute. I don't know it it is a feature or a bug, but it looses its data if the timescale is changed. But sometimes changing the from eg 15min to 5 min made it work again. |
OK. Here is the settins I use to make it work. For the dashboard I run in now-5m with no refresh. But if I change query options it will some times stop working again until i restart grafana service. MQTT plugin is still in beta I see. |
Thanks for the tip with the restart. Now it's working more reliable |
I've been getting this issue on 9.4.3, and for some reason it thinks that I'm no longer subscribed to it after ~15s, even though I am?
Despite it thinking that I'm not subscribed it continues sending blank updates ( |
I am still on OSS v9.4.3. Per the suggestion from @gdxas, I have set the time selector to 5 minutes with no refresh, and the MQTT streaming data is now working for more than 20 minutes (even though only 5 minutes are displayed on the graph). |
Could be something as in here the broker close old connection because the client id is same? |
I have the same problem with Grafana 9.4.7 on Raspberry. In my case it's not because of the same client ID, I checked the logs and there is no "already connected" in mosquitto.log, that appears when I try to connect to mosquitto by mosquitto_sub using the same client ID as grafana MQTT source. This seems to be a bug of this source. |
Hi, after some more investigation my initial problem (not receiving any palyoads) was caused by the topic I was trying to subscribe to. |
That was my initial assumption as well but it turned out to be not true. I can have just one client publishing one small topic, without any "/" signs, running and then stopping at random points. I tried different panel types - it doesn't matter. Nothing is being added to However, looks like it is somehow related to the selected time range - both on the dashboard and Data Source Explore functionality. Whenever data stops, I change the time range and data is being visible and updated again. Refreshing the dashboard, refreshing the browser, restarting the broker and cancelling/run query (in Data Source Explore) do not help but changing time range always helps - still temporarily though. |
I can confirm that this method works for me as well! |
Exactly what I am experiencing now |
I'm experiencing the same issue. MQTT logs say that Grafana MQTT client unsubscribed from the topic. Only unsubscribe invocations in source code are in pkg/stream.go on lines 27 and 35. |
The plugin registers requests for MQTT topic data in a map with key format "<TIME_INTERVAL>/<MQTT_TOPIC>". This is derived from the Grafana Live channel e.g. ds/be19d38d-2126-430f-95b1-d2eebd9ef710/500ms/MQTT_TOPIC_A. Some times due to events coming from the UI (not sure which the full set of those cases is), the panels subscribe to a different Grafana Live channel, where the interval is different e.g. ds/be19d38d-2126-430f-95b1-d2eebd9ef710/1000ms/MQTT_TOPIC_A. The problem is that the plugin's backend code as it is, will insert into a map the new "requests for data" with key 1000ms/MQTT_TOPIC_A but then it will remove from the map the previous entry 500ms/MQTT_TOPIC_A and cancel the subscription to MQTT_TOPIC_A. Therefore the subscribers with key 1000ms/MQTT_TOPIC_A will not receive any data and therefore neither will the panels. I have modified the backend code in my repository fork, in order to not cancel the subscription to MQTT topic if there is at least on other "request for data" from it. I built the plugin and the problem is solved for me at least. |
Thanks @isarantidis for analysing and providing a fix for (parts of) this issue. Works much more reliable on our end with the patch. Hope someone will review the PR #76 soon. |
Also exercising stability issues. Grafana v10.0 |
10.1 the same.... |
Still happening Grafana v10.0.2-cloud |
I have the same problem on grafana version 10.0.3 running on Ubuntu on a raspberry pi 4. Can someone please post instructions on compiling the mqtt plugin incorporating @isarantidis patch? |
Same here, activated two queries then the data will sometimes show up with the correct values and then the stat visu will display "No data", but the data is there when i check it with MQTT explorer. |
|
I have the same problem with v1.0.0-beta.3. It only works with 5mins no refresh, but on the same dashboard I have visualizations that require 24h of data, so it is not a solution for me. |
Has anyone been able to find a solution to this issue for Grafana Cloud? Thanks. |
EDIT: It seems that it can be solved to set "Relative time" (under Query options) to a low value (in my case 1 minute). With the added benefit of the "live data" experience, since the Stat visualisation showes the values from the last minute in a very nice way (my source updates about every 2 seconds). @stenfalp could you test? |
I have set up a Grafana local server v8.4.5 which is connected through an MQTT broker plugin for grafana which can be found here: GitHub - grafana/mqtt-datasource: MQTT Datasource for Grafana allows streaming data from any MQTT broker running either locally or remotely. 1 Succesfully installed that and works fine. The only problem i face is that my realtime data stops being showed after some minutes. I taught it was the auto refresh option but it wasn’t. Once i refresh the browser my live data is back and will be shown for another minute or two. I would like to have realtime data or data with 5-10 seconds delay.Does someone has any suggestions? Couldn’t find any thing on the forum.In the MQTT explorer application if see my realtime data so its very weird why it stops
![pEEEU](https://user-images.githubusercontent.com/64960215/165697389-29d184e1-6939-4ba4-a7f9-9404c4bcb439.png)
.
The text was updated successfully, but these errors were encountered: