How can i store data in grafana

Hi all,
I had json file that contains data changing every 1 minute, I configured my dashboard with infinity that listens to these changes and all is good except I need to store the old data and visualize it so I can compare

my json file is:-
“my_time”: “46356746563”
“fun_time”: “13”

This data changes every 1 minutes. but only the newest one is on the dashboard graph. i need to keep it.

I need it to look like that:-


Is it a file on disk or an api?

The file is on github.
Actually the client provided me with the file and it’s continuously changing and the datasource is the link to github.

1 Like

Grafana does not out of the box provide a means of saving data. But maybe you can consume this data into a database such as mysql or influx db. Otherwise if it changes every minute there is nothing grafana can do about that

1 Like

Thanks. Actually i’m trying to use influxdb, I’m configuring it but I’m stuck. so if can you help me with tutorials for it

1 Like

Sure. Is the name of the json file in github unique all the time or does it chamge each minute?

The name of the json file is persistent

1 Like

Is there any indication in the file itself some meta data indicating it is the new file

oh sorry, i didn’t get you !! but nothing is changing about the file except the values of its entries

Inside the file, is there a unique timestamp or another unique identifier that shows the file at 11.00am is different than the file at 11 01am

Because it will be an etl process and you do not want to duplicate data and give wrong results

No there are only 2 entries, they includes the start time(timestamp) and the trip time (in seconds).

1 Like

Mr. yosiasz. The JSON file actually isn’t on github, it’s hosted on a website and the client gave me only the url

1 Like

Do you have any skills using python or powershell or any other scripting language?

Yes i use shell script and some python

Check the documentation of influxdb on how to write from json to influxdb using python.

But here are some examples

Once you get your data into influxdb let us knownfor next steps


I don’t know how can i thank you !! You helped me a lot. Everything is working in the proper way as I needed.
thank you so much

1 Like