Marcusolsson-csv-datasource- local path does not allow read from local machine

Hi, I have installed marcusolsson-csv-datasource plugin but unfortunately I’m not able to reach my csv using the local path. I have tried using testdata option and copied my data inside grafana/public/testdata path but the same case it does not recognize my file.

I’ll appreciate if you could help me on this matter.

Kind regards,
Zuhoor

To read CSV on the local machine, you need to allow local mode. Let me know if the problem persists after you’ve enabled this.

How about the issue of grafana telling me that the number of fields are incorrect

If one uses the CSV datasource to read a CSV file on a local drive (e.g. a NAS drive), would the URL path be something like this?

\\192.168.10.199\Export\Orders_03-17-2022.csv

or this?

P:\Export\Orders_03-17-2022.csv

I don’t know enough about Windows to say for sure, though due to this issue, you’d need to use forward-slashes on Windows:

This should work:

P:/Export/Orders_03-17-2022.csv
1 Like

Thanks @marcusolsson I am running Grafana on a Debian Linux machine (not Windows). Given that, do I still use forward-slashes? I have tried many variations of the file path with no success. I though for sure that

\\192.168.10.199\Export\Orders_03-17-2022.csv

would work.

For any Linux (or macOS) machine, you should use forward-slashes. Running pwd in the directory should give you the correct path.

1 Like

Thanks Marcus. For Grafana running on a Debian Linux machine accessing a .csv file on a local NAS (Synology), I mounted the drive and here is what worked:

//synology-nas/Files/Export/abc/abc_Late_Orders_03-24-2022.csv
1 Like

cool… It works!!! Thanks @marcusolsson

Hi Marcus Olsson, I’m in desperate need of your helping, I wrote local path but Grafana gives me this error: stat /home/kali/Data/data.csv: permission denied. what should ı do?

1 Like

Link to doc is outdated. Correct link Configuration | CSV for Grafana

Hey all, on the same topic of csv datasource,

I have a csv file on my local, and it was working well . The data was uploaded, I even transformed the fileds and time series graph was visible on dashboard.

Now, I ran few test two days later, and had to manually update the csv datasoucre. Since then it is giving me error that “Data is missing a number”. (Manually updating as I have to maintain previous data as well).

Below is the sample csv,
02/12/2024 22:14:32.483,“920592384”,“8316493824”,“10457333760”
.
.
02/12/2024 22:44:32.493,“920592384”,“7915544576”,“10888040448”
02/16/2024 11:34:58.638,“1005658112”,“8231473152”,“10551103488”
.
.
.
I manually added the data entries from 02/16/2024. But since then, unable to view in timeseries, whereas the table is visible with updated data.

any suggestions?

Welcome @ameybenare to the Grafana forum.

As you know, that plugin is no longer being actively maintained, so your luck may vary. I read in this Github issues thread that “I found that it’s only happened if the file’s modified date is over 2days (I didn’t test it in details for how much time for sure)”. Is that the same as what is happening to you? You might want to post your issue to that board since others who use that plugin may be better equipped to answer you. Or you can switch to the Infinity plugin.