Skip to content
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

continuosly refresh if dashboard refresh time is set #101

Open
DonatoD opened this issue May 18, 2024 · 5 comments
Open

continuosly refresh if dashboard refresh time is set #101

DonatoD opened this issue May 18, 2024 · 5 comments

Comments

@DonatoD
Copy link

DonatoD commented May 18, 2024

Hi, I'm trying to put a panel that receives MQTT data within a dashboard with traditional panels that send queries according to the refresh time interval set for the dashboard. This doesn't work properly: the MQTT panel is visible refreshed together with the others and all previous data are cancelled (the ones received before the refresh). Moreover, if the MQTT panel receives string data, it stops working after the first refresh.
So I cannot put togheter this panels in the same dashboard: the MQTT panel works only if I set to off the dashboard refresh interval, but in this way the other panels doesn't get updated, of course

@teefixx
Copy link

teefixx commented Oct 7, 2024

Hi
I have the same behaviour. Did you solve the problem?

@DonatoD
Copy link
Author

DonatoD commented Oct 8, 2024

Not yet, and it's a pity that no one is interested in solving it. Unfortunatly I'm not able to do it :-(

@ArchiZ0
Copy link

ArchiZ0 commented Oct 8, 2024

Hi @DonatoD,
I'm not the developer of this plugin, but I'm using it extensively for on-demand live network data. While I don't know your specific use-case (e.g., refresh time, frequency of messages sent in your topics), here's some insight:

  • MQTT brokers are queues of data, not data stores. Once a message in a topic is consumed, it's gone. The only persistence of data possible is the last one sent to a topic IF you tag it as "retained".
  • Grafana is a data visualization app, not data persistence. On any sort of page refresh (auto-refresh, page reload, time scale change, etc.), Grafana will re-read from the data source. So in the case of MQTT, only the last retained message will be displayed, if any.
  • Even if you have retained messages in your topics, there's a timestamp associated with them. If this timestamp is outside the time window set in Grafana, the messages won't appear.

In short, for your use-case, I would recommend storing those messages in a data store, like InfluxDB or similar, and let the auto-refresh work normally.
Hope this helps!

@DonatoD
Copy link
Author

DonatoD commented Oct 8, 2024

Hi @ArchiZ0,yes thanks for the insight. Yes I know that, and for all this stuff I think that the best solution would be, if possible, to develop a configuration that allows that panel stop refreshing with the full dashboard. In this way the problem would be solved and it would open to a lots of other user's case

@ypnos
Copy link

ypnos commented Nov 13, 2024

The issue is a bit more complex than explained by @ArchiZ0. First of all, a page refresh does not reload the page. Panels on the page can retain a state during refresh (or change of dashboard variables / time range).

Other transient data sources, e.g. Grafana Websocket Live Push, do survive the Autorefresh consistently. Here is an example of both next to each other:
Image

The Grafana Live Push data source has a "buffer" setting which can be set to Auto. I don't see why this could not be done with MQTT source as well. It is obviously a bit more work than just a quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants