I try to install MQTT-datasource from GitHub - grafana/mqtt-datasource: MQTT Datasource for Grafana allows streaming data from any MQTT broker running either locally or remotely. in a Docker container. I use Docker Desktop for windows.
I followed the guide to compile the plug-in on windows. But now I don’t know how to install the plugin in the container.
Can anyone help ?
If using this in a docker/container is anything like using it in a Linux environment, move the compiled plug in to the folder
update the /etc/grafana/grafana.ini
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loade>
allow_loading_unsigned_plugins = grafana-mqtt-datasource
restart the server, and should work when you try to add data source in Grafana.
Thanks for your answer.
Do you know if I can compile on windows then copy the plugin in the right place or I have to compile on Linux because the container is like-Linux (Official Alpine image) ?
Do you know how copy the folder in the Grafana plugin folder in the container ?
if for the backend you use the command
mage buildAll it will cross build the backend - so when you copy the plugin dist to a different platform it will work - you can use
docker cp (docker cp | Docker Documentation) to do the copying - another option would be to just mount the folder to your container - just my 2 cents
I executed mage build all with success.
Regarding the folder mounting in the container, I have the following error message :Error: ✗ Plugin not found (Grafana v8.4.4 linux-amd64).
Here is my docker-compose file :
Do you have an idea why the plugin is not found ?
Do you know or know someone that can help to set permission ?
It’s probably right, because I need to mount a local folder on Windows to container in Linux…
wait - on a second look - is this a windows host trying to mount on a linux container?
in that case maybe the path is the issue - try to use an absolute path on the src side of the colon
I got it !!
I copied the MQTT plugin in the local folder “grafana_plugins” on my Windows host and also mounted the “/var/lib/grafana” on my host