Clear Filters
Clear Filters

from grafana to MATLAB using MQTT protocol

33 views (last 30 days)
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.

Answers (1)

Venkat Siddarth
Venkat Siddarth on 7 Apr 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

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!