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

tls ... how to configure to make it working ? #69

Open Bjaris opened 1 year ago

Bjaris commented 1 year ago

Hi all, I a just beginning to use Grafana & I decided to use as datasource MQTT with Mosquito brocker on Windows configured like this :

listener 8884
protocol mqtt
require_certificate false
allow_anonymous true

cafile C:\Program Files\mosquitto\certs\mqtt_ca.crt
certfile C:\Program Files\mosquitto\certs\mqtt_srv.crt
keyfile C:\Program Files\mosquitto\certs\mqtt_srv.key
tls_version tlsv1.1

Grafana is on a Linux 22.04 VM and I configured the MQTT Data sources plugin like this: URI : tls://192.168.0.108:8884 Username : tester Password:

After a Save & Test : error connecting to MQTT broker: network Error : x509: cannot validate certificate for 192.168.0.108 because it doesn't contain any IP SANs

Look like a cetificate probleme & I tried to modify grafana.ini to give the cert file but with no chance yet. How to proceed i.e. where should I put certificate and what to modify ? Thx in advance.