What is the best way to convert jsons folder to databae for grafana?

I am new with grafana.
I have a folder with several Jsons and I want to convert all the Jsons to a database (I don’t care about the type) and visualize some data with grafana.
I wanted to know the best way to do that.

Welcome

Will the conversion from json to database be a continuous thing or a one time conversion? Can you post a sample json here?

In the end, it should be continuous, but I want it to be one time for the start. The JSON is the result of iPerf3. For example Iperf3 JSON output CSV - .[ZooBaB].

Does iPerf itself have a rest api?
Check the following, it does not get better than using telegraf and point it to influxdb

No, it doesn’t have Rest API,
Yes, I saw this but, I don’t use the telegraph to create the iPerf3 stream.

You probably should highly recommend it but anyways…
What database product do you currently have or which one are you most comfortable with?

Mysql, ms sql, mongodb, mariadb, postgres…

I don’t really care, my goal is to visualize data from several Jsons.

which part of the Iperf3 JSON output CSV - .[ZooBaB]. data do you want to visualize and in what visualization?

bar chart, stats?

I want to present the bits_per_second in a time series graph( I run the iperf3 for 20 seconds - and want to see the bits_per_second )

1 Like

from which node of the json?
streams or sum
Also if you want time series graph where is the timestamp you want to use in this json blob?

"streams": [
				{
					"socket": 4,
					"start": 1.00013,
					"end": 2.0001,
					"seconds": 0.99997,
					"bytes": 10579088,
					"bits_per_second": 84635200.0,
					"retransmits": 0,
					"snd_cwnd": 291048,
					"omitted": false
				}
			],
			"sum": {
				"start": 1.00013,
				"end": 2.0001,
				"seconds": 0.99997,
				"bytes": 10579088,
				"bits_per_second": 84635200.0,
				"retransmits": 0,
				"omitted": false
			}

It is from the streams (each stream has a start time like in your example is “start: 1 sec”)

so in order for that data to be plotted on a timeseries one needs a timestamp. start: 1 sec is not a timestamp

Ignore this example, think about several JSON with timestamps and values,
It can be a bar graph if it is easier. Therefore, my question is: how can JSON data be presented in Grafana in the simplest way possible?

1 Like

Thanks, But I want the input will come from a file.

Use some type of scripting language like python to read json files and push content to db