Unable to graph CSV data

Hello ,

I’m a Grafana beginner and trying to do a simple use case of plotting CSV data into a graph .
I’ve a simple CSV file , using it locally .

Already added below in grafana.ini and csv file is being read .

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

I can view the data in ‘table’ mode , however graph is not working .

CSV file content below

time,	A-series
11/22/2022 23:06,	1
11/22/2022 23:06,	20
11/22/2022 23:06,	90
11/22/2022 23:06,	30
11/22/2022 23:07,	5
11/22/2022 23:07,	0

Message is
“Unable to graph data”
“Switch to Table View”

Appreciate help in this .

thank you

Welcome

You have selected Previous Year on the time filter. Select last 24 hour and see what happens

In this case Grafana should understand that your time column is an actual date and your A-series values as numbers…

You will have to do that by casting the type of each column using convert field type transformation

And yes - as @yosiasz mentioned, increase your timerange

1 Like

interesting that the plugin’s conversion does not work

image

Thanks all for the responses .

@yosiasz – I reduced the time range to last 7 days (since my data time starts from 11/22/2022).

@bujupah – I could not find the transformation “convert field type” in the list of transformations in my grafana installation . Is there any way to get it ?

my granfana server version is 7.5.15

[root@grafana1 bin]# grafana-server -v
Version 7.5.15 (commit: NA, branch: master)

Time to upgrade or install a separate latest grafana and point it your data source and you get latest and greatest

It worked finally :slight_smile: .

Thank you to all your responses .

As suggested , below was done .

Updated grafana to latest version (9.2.6)
Got the “convert field type” transformation
Did the transformations as @bujupah suggested.

PS : One thing I noticed while testing with the new version of grafana was , that csv file could not be in /tmp directory , I had to move to other directory in order for the file to be known/discovered by grafana.

2 Likes