The mqtt-datasource plugin allows you to see live data from MQTT in Grafana. Here is a step-by-step guide on how to install it in the Grafana Helm Chart.
Instructions
- Go to UMHLens / OpenLens and navigate to Helm -> Releases.
- Change the Grafana section in the Helm Chart.
- In the section
extraInitContainers
, add the following additional container:
extraInitContainers:
- args:
- mkdir -p /var/lib/grafana/plugins
&& cd /var/lib/grafana/plugins
&& apk add mage --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
&& apk add git
&& git clone https://github.com/grafana/mqtt-datasource.git
&& cd mqtt-datasource
&& yarn install
&& yarn build
command:
- /bin/sh
- -c
image: node:lts-alpine3.16
imagePullPolicy: IfNotPresent
name: init-mqtt-datasource
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /var/lib/grafana
name: storage