Hello everyone.
I've been struggling with the installation, so I thought this information would be useful, especially for people not familiar with tools used.
Grafana version 12.3.0 installed (latest at the time of posting)
Necessary packages and tools install
I decided to use conda to simplify installation of all packages needed for plugin build.
I recommend to use Miniforge and install it system-wide, e.g. /opt/conda
I've created conda env just for this plugin packages. It's not required, but good to have.
conda create -n grafana_mqtt to create and conda activate grafana_mqtt to activate it.
After that I've installed latest available versions of required packages:
conda install nodejs yarn go
mage is also needed for build, but I haven't found it for conda, so I installed it from repo.
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go
NOTE: it's installed in the user folder, e.g. /root/go/bin, not to conda environment. Use absolute path or add to $PATH.
Packages versions:
(grafana_mqtt) # node --version
v25.2.1
(grafana_mqtt) # go version
go version go1.25.5 linux/amd64
(grafana_mqtt) # yarn -v
4.12.0
(grafana_mqtt) # mage --version
Mage Build Tool v1.15.0-9-g78acbaf
Build Date: 2025-12-13T13:45:36+03:00
Commit: 78acbaf
built with: go1.25.5
Plugin build
Copy plugin files to Grafana plugin folder, abs path will be /var/lib/grafana/plugins/mqtt-datasource-main.
In plugin folder run yarn install.
I also had to configure proxy for yarn. Define httpProxy and httpsProxy in .yarnrc.yml in plugin folder
In my case it complained about missing packages
➤ YN0002: │ grafana-mqtt-datasource@workspace:. doesn't provide @grafana/e2e-selectors (pe263e), requested by @grafana/plugin-ui.
➤ YN0002: │ grafana-mqtt-datasource@workspace:. doesn't provide @types/react (p3915e), requested by @grafana/data and other dependencies.
➤ YN0002: │ grafana-mqtt-datasource@workspace:. doesn't provide rxjs (pc5866), requested by @grafana/plugin-ui.
I had to manually add it:
yarn add rxjs @grafana/e2e-selectors @types/react@^18
Note: @types/react is pinned to version 18 because of compatibility issues:
@types/react is listed by your project with version 19.2.7 (p3915e), which doesn't satisfy what react-calendar (via @grafana/plugin-ui) and other dependencies request (^18.2.25)
After that run yarn build:
(grafana_mqtt) # yarn build
assets by path *.md 5.14 KiB
asset README.md 4.06 KiB [emitted] [from: ../README.md] [copied]
asset CHANGELOG.md 1.08 KiB [emitted] [from: ../CHANGELOG.md] [copied]
asset module.js 11.3 KiB [emitted] [minimized] (name: module) 1 related asset
asset LICENSE 11.1 KiB [emitted] [from: ../LICENSE] [copied]
asset img/mqtt.svg 1.31 KiB [emitted] [from: img/mqtt.svg] [copied]
asset plugin.json 1.18 KiB [emitted] [from: plugin.json] [copied]
orphan modules 4.11 MiB [orphan] 1483 modules
runtime modules 1000 bytes 6 modules
built modules 21.7 KiB [built]
modules by path external "@grafana/ 126 bytes
external "@grafana/data" 42 bytes [built] [code generated]
external "@grafana/runtime" 42 bytes [built] [code generated]
external "@grafana/ui" 42 bytes [built] [code generated]
./module.ts + 10 modules 21.4 KiB [built] [code generated]
external "module" 42 bytes [built] [code generated]
external "rxjs" 42 bytes [built] [code generated]
external "react" 42 bytes [built] [code generated]
external "@emotion/css" 42 bytes [built] [code generated]
webpack 5.99.9 compiled successfully in 3359 ms
I took me some time to figure out next step, because in the README it says mage reloadPlugin, but build script was changed and now yarn build only builds frontend.
To build backend part, run
or check available targets with mage -l to build it for your distro only, e.g.:
I the end your dist folder content should look like this:
(grafana_mqtt) # ls -lh dist/
total 25M
-rw-r--r-- 1 root root 1.1K Dec 13 15:02 CHANGELOG.md
-rwxr-xr-x 1 root root 1.3K Dec 13 15:09 go_plugin_build_manifest
-rwxr-xr-x 1 root root 25M Dec 13 15:09 gpx_mqtt_linux_amd64
drwxr-xr-x 2 root root 4.0K Dec 13 15:02 img
-rw-r--r-- 1 root root 12K Dec 13 15:02 LICENSE
-rw-r--r-- 1 root root 12K Dec 13 15:02 module.js
-rw-r--r-- 1 root root 31K Dec 13 15:02 module.js.map
-rw-r--r-- 1 root root 1.2K Dec 13 15:02 plugin.json
-rw-r--r-- 1 root root 4.1K Dec 13 15:02 README.md
Enabling in Grafana
Don't forget to change /etc/grafana/grafana.ini to load plugins from disk and allow this plugin to be unsigned:
[paths]
...
plugins = /var/lib/grafana/plugins
[plugins]
...
allow_loading_unsigned_plugins = grafana-mqtt-datasource
Finally, restart your Grafana and check available plugins.
Congrats, now you can add MQTT data sources.
Hello everyone.
I've been struggling with the installation, so I thought this information would be useful, especially for people not familiar with tools used.
Grafana version 12.3.0 installed (latest at the time of posting)
Necessary packages and tools install
I decided to use
condato simplify installation of all packages needed for plugin build.I recommend to use Miniforge and install it system-wide, e.g.
/opt/condaI've created conda env just for this plugin packages. It's not required, but good to have.
conda create -n grafana_mqttto create andconda activate grafana_mqttto activate it.After that I've installed latest available versions of required packages:
mageis also needed for build, but I haven't found it for conda, so I installed it from repo.NOTE: it's installed in the user folder, e.g.
/root/go/bin, not to conda environment. Use absolute path or add to $PATH.Packages versions:
Plugin build
Copy plugin files to Grafana plugin folder, abs path will be
/var/lib/grafana/plugins/mqtt-datasource-main.In plugin folder run
yarn install.I also had to configure proxy for yarn. Define
httpProxyandhttpsProxyin.yarnrc.ymlin plugin folderIn my case it complained about missing packages
I had to manually add it:
Note:
@types/reactis pinned to version 18 because of compatibility issues:After that run
yarn build:I took me some time to figure out next step, because in the README it says
mage reloadPlugin, but build script was changed and nowyarn buildonly builds frontend.To build backend part, run
or check available targets with
mage -lto build it for your distro only, e.g.:I the end your
distfolder content should look like this:Enabling in Grafana
Don't forget to change
/etc/grafana/grafana.inito load plugins from disk and allow this plugin to be unsigned:Finally, restart your Grafana and check available plugins.
Congrats, now you can add MQTT data sources.