Read files from ftp and load to grafana?

Hello,

In the context of creating a dashboard, I would like to know if it would be possible to use an FTP server containing files (.txt) as datasource? And if not, what other means should I use?

Regards,

Hello,
It’s hard to say wich data solution is best for you.
it’s depend of your data, domain of expertise and other things.
I strongly recommand you to use database solution to exploit you data since it’s the dedicated technology to handle data.
Text file is unstructured if you not define data parsing format…
maybe the easiest gap for you is to use CSV as database if your volume is not important

Thank you for your answer Alexandre.
Indeed, while doing research, I came across a solution including an ETL pipeline allowing to read files coming from an FTP server to transmit them to google cloud (Database) Building a Simple ETL Pipeline with Python and Google Cloud Platform | by Tobi Sam | Towards Data Science. However, when checking the files on my FTP server, I noticed that a file will not exceed 1 Mo. Is it really necessary to set up a database to store so little? And if not, how can I use a CSV file as a datasource?

You can read from a remote ftp folder

You will also need to configure the following in the grafana config file for the csv plugin

[plugin.marcusolsson-csv-datasource]
allow_local_mode = true

Thanks for your answer.
Where can i find this config file ?

Checj it out here

I found the default.ini file but there were no lines with the corresponding plugin (marcusolsson-csv-datasource), so I copy-pasted the 2 lines into the default.ini file. Is this correct?

1 Like

Correct. And then restart grafana

After restarting grafana, I have the following message displayed: “local mode has been disabled by your administrator” when I tried to use the csv plugin in the dashboard.

Are you on cloud version?

No i used the following URL : http://localhost:3000/

are you sure you added

[plugin.marcusolsson-csv-datasource]
allow_local_mode = true

to the correct default.ini file and saved those changes?

Also which csv plugin are you using?

I added those lines in default.ini of the following directory :C:\Program Files\GrafanaLabs\grafana\conf.


And i used this csv plugin :

it seems like you have installed it but have not yet created a data source?

image

image

I created the datasource with the following path: C:/Users/Public/Grafana/journalR.csv

But when I try to use it in my dashboard, it shows me this:

1 Like

let me try it locally. what version of grafana do you have? @Seji

I have grafana OSS 9.1.4.0.

1 Like

It’s good, I no longer have a problem, I have the table with the values ​​displayed.

1 Like

Works just fine for me. But the image you posted for your default.ini seems very unusual, did you modify it?

image

are you sure it is this one in the following folder?

1 Like

I redid the following steps:

  • Re install grafana OSS version 9.1.5.0

  • add those lines in default.ini of the following directory :C:\Program Files\GrafanaLabs\grafana\conf.

  • win key → search the following “services” and open app → scroll to find grafana-> right click → restart

  • Create datasource with the local directory and add it to the dashboard

1 Like