grafana / mqtt-datasource

MQTT Datasource for Grafana allows streaming data from any MQTT broker running either locally or remotely.
Apache License 2.0
168 stars 49 forks source link

Connected but not receiving on subscibed topic #60

Open tomy983 opened 1 year ago

tomy983 commented 1 year ago

I got the plugin installed (using grafana 9.3.1) on ubuntu 20.04 Added the data source, (using password auth) and got it correctly connected. image

No data is received on test topic (to which I publish an integer as raw data). image

Tried also with /test an also using json with no difference. Data is no coming. Looked for info in grafana logs but could not find anything relevant (do I need to set up logging somewhere?)

edizaziz-dev commented 1 year ago

Just tagging along to see if any one else is experiencing this also, I certainly am.

My experience so far is, I know the mqtt broker is working because I can see it in node-red.

In Grafana, in the explore area, I checked the browser's network tab and I can see successful posts to "query" with a valid payload to the server but the table resolves to 0 results with no further responses from the server or the table just keep loading forever.

I'm running it all under home assistant which in a container on proxmox.

seeul8er commented 1 year ago

I had the same issue. I changed from TCP to WebSocket and it still does not work. I can see the data from the subscribed topics. Seems like something is broken with TCP?

tomy983 commented 1 year ago

I don't have websockets enabled, so obviously this is not working for me. Are there any debug log I could activate to look further into why this isn't working?

tomy983 commented 1 year ago

Right, finally got around to test also WebSocket. Unfortunately the result is exactly the same as the first post..

OlivierGre commented 1 year ago

I have the same problem.

stian-01 commented 1 year ago

I have the same problem... I have Grafana 9.3.6, using Aedes MQTT broker in Node-RED (which I know works as I use it for several things). In the Grafana log it says "Connecting", but never "Connected" if it's supposed to say that. It also says "Disconnected" and then "Connecting" if I redeploy in Node-RED or something (i.e. it should work). And the Aedes broker also states that the Grafana client is connected correctly, like any other connected client. I still get nothing, regardless of the topics I subscribe to or the messages being sent

jforge commented 1 year ago

Same issue on Grafana 9.3.1 and different brokers: Mosquitto, HiveMQ, VerneMQ. All brokers are 100% working as expected for unencrypted tcp/1883, tls/8883 and wss over 443 with a /mqtt context (VerneMQ).

Also:

For now, I need to use the regular telegraf/mqtt to influxdb to grafana approach as usual, but I would actually like to use this MQTT plugin directly without TIG/TICK approaches.

fullmetal-fred commented 1 year ago

Any progress here? I'm having the same issue...just can't get the plugin to receive any data. Using Grafana in a container and the EMQ public broker over TCP and/or Websocket.

cicciopizza commented 1 year ago

I have the same problem

ryanshow commented 1 year ago

I'm also experiencing this exact same issue. No entries in any log that I can find suggesting a failure is happening, the query simply never returns anything.

mcules commented 1 year ago

Same here. It's connected to the broker, but no messages arrive.

chrispi68 commented 1 year ago

Same problem here. I think this project is totally broken.

daan0308 commented 4 months ago

Same problem here. We can get it working locally but not over the network. It is weird to see why this is, since the setup is completely the same.

jforge commented 4 months ago

Same problem here. We can get it working locally but not over the network. It is weird to see why this is, since the setup is completely the same.

@daan0308 could you please describe, how you get this working locally? This is interesting and one step forward.

daan0308 commented 4 months ago

My issue was fortunately not related to the above issue, but related to proxy settings and the way grafana works.

Grafana live (which is the implementation this adapter uses to stream its data) uses websockets to connect to the Grafana web interface. My instance was setup behind a proxy, which did not have http to websocket upgrades configured correctly.

The weird thing is, and this should be more of a Grafana issue, is that Grafana should show an upgrade/http error instead of 'no data'. That would make it way more easy to debug.

Jaroslav-Dvorak commented 3 weeks ago

Try this in Grafana addon configuration - add env_vars.

Clipboard01