from grafana to MATLAB using MQTT protocol

10 visualizaciones (últimos 30 días)
SeongYong Park
SeongYong Park el 17 de Mzo. de 2023
Respondida: Venkat Siddarth el 7 de Abr. de 2023
Hi, I want to transfer some data from grafana to matlab.
I'm trying to use the MQTT protocol, but the process of getting data is difficult even if I use the Industrial communication toolbox.
I'd like your advice.

Respuestas (1)

Venkat Siddarth
Venkat Siddarth el 7 de Abr. de 2023
I understand that you are facing difficulty in retrieving the data from Grafana using MQTT protocol. Assuming you are looking for alternatives, I suggest creating a RESTful API. Which can be created as follows:
Configuring Grafana
  • Firstly, configure the data source in Grafana
  • Then generate an API key in Grafana and note them down for subsequent API requests
Retrieving data from Grafana using the API
  • After that determine the API endpoint to which you want to request
  • Then you can build the API query, depending on the data you want
  • Using the webread function you can send a request to the API and retrieve data. The request requires the API key as an authorization token, which you can pass in using the weboptions function.
You can check out the corresponding documentation to know more about:
I hope this information is helpful.
Best regards,
Venkat Siddarth V

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by