-
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
Streaming is not working? Have to manually refresh #20
Comments
thank you for raising this issue. can you provide some more details about your MQTT setup, as in the broker side and where the messages are being published on the topic etc? have you given the dummy MQTT test broker a try yet? its here: https://github.com/grafana/mqtt-datasource/blob/main/test_broker.js you can run that by installing NodeJS and then running this from root of this repo:
|
I'm currently using the EMQx broker. I'm publishing floats (via MQTT they are always in the form of strings, but without quotes or other decoration) on topic I am willing to try another broker, though I do not expect that to make a difference. However, that will have to wait two weeks due to holidays. |
hmm - can you show me what the message looks like exactly? i think it has to do with how your message is formatted and is being received by the frontend. thank you for the details 🙂 |
I had the exact same issue with Grafana v8.1.2, running in Docker container. Is the grafana Live testdata stream working on your side? |
Running a Mosquitto Broker(v3.1.1) on a Raspberry pi and I'm also not able to make the data stream by it self. Only setting the refresh rate updates the MQTT data in grafana. |
Can you check the Grafana Log? Are there any error messages? |
This is a copy from the log. I notice a lot of "Request Origin is not authorized" that I do not know if is due to the MQTT. t=2021-08-27T19:17:23+0200 lvl=info msg="Starting Grafana" logger=server version=8.1.2 commit=103f8fa094 branch=HEAD compiled=2021-08-19T20:19:17+0200 |
Ok thank you. I got the same messages. It is not caused by MQTT, but by the HTTP Requests, performed by the Live panels. This HTTP request fails status exit code 403 (forbidden). This is because Grafana checks the Origin of the HTTP request to match the So now you have 2 possibilities. You have to change a parameter in the Grafana configuration file. ( see the Docs https://grafana.com/docs/grafana/latest/administration/configuration/ )
I have to say, that I am also not an expert in HTTP and am currently not 100% sure as there are also some other IP-addresses and localhost mentioned above. So if this does not work, you can maybe try a list of the options. Probably the easiest way is to use a wildcard, by setting |
That did the trick thanks a lot. :) Now I only have to manage the MQTT topic that Grafana live don't seam to like due to spaces or Danish special letters eg æ, Ø Å. Invalid channel ID" logger=live user=1 client=adc1ca40-15a4-424d-a341-5afc7e234901 channel="1/ds/Y1apShRRk/Værelse mor cheers |
Ok, back from holiday. Good to see a lot of activity on this issue. Ok, so by now it seemed clear it was not a broker issue, but rather a web issue. I was not seeing any of the "Request Origin is not authorized" messages described above, so in my case that was not the problem. While trying another browser (Chrome instead of Firefox) I noticed that I also had the same error messages in the console as linked from this #20 (comment), i.e. websocket connection failed. I now realised there was an apache2 reverse proxy in between that was not handling the websocket connection right. I am serving grafana in the virtual path /grafana on my server. This is the relevant piece of my apache2 configuration:
Reading from grafana/grafana#36929 (comment) I managed to make it work by enabling mod_rewrite and adding these lines to the apache2 configuration:
Thanks to all for your help! |
Hi, from the animated GIF in the README I got the impression that a panel using the MQTT data would auto update as new data came in. I was hoping to use this to show my data at 10 Hz which the normal refresh method does not support.
However, for me, the panel does not auto update as in the README GIF. Do I have to activate that somewhere? I do to see all datapoints (10 are published each second) when I manually refresh or set the dashboard refresh to 1s. But then the whole dashboard updates at 1 Hz and it just fills in 10 datapoints at a time, and not 1 datapoint every 100ms, as I had hoped.
Do I have to activate streaming somewhere? Or am I missing something?
Grafana 8.1.1 on Debian 11, used the Ubuntu steps from the README to install the plugin. That seems to have worked at least.
The text was updated successfully, but these errors were encountered: