Where to find telegraf tutorial to move data from .csv file to influxdb?

Hi.

I’m trying to find tutorial to feed influxdb base from .csv file.

I think I need to use telegraf but … same, I need very detailed tutorial.

I managed to install Grafana, influxDB, and I’m now missing to feed my influxdb database.
Example with IOT (temperature IOT examples) would be perfect.

Well, it seems it all depends on the very long telegraf.conf configuration file !

Hi,

You can create a script that automatically create your csv file and call telegraf to use it.
Or telegraf can call this script by himself and send the data.

Hi Meruem.

How are you ?

My CSV is already made and populated with data.

I’m struggling now struggling on how write the telegraf.conf file.
I think I need to use the CSV parser, but I don’t know how and where to include it in the telegraf.conf file.

I’m on : here

Here is a link of myfile.csv I would like to transmit to influxDB.

Plus, I’m confused about measurements, tags and field. A direction for playing with SQL like request in influx with real example would be of help. Or how to google newbie exercises.

Hello @hary,
Perhaps this tutorial is helpful to you?

@Anaisdg

I finally managed to do something, not yet nicely done, but at least something in happening and I got my database created in InfluxDB with some data filling up in it.
It will need some improvement for sure, but I now need a brake.

This was dam a difficult step indeed.

As the csv file is not changing (no more data added), it gives me the following output :

and keeps running like this forever !!

It seems, it’s not stopping at the end of the CSV file. I had to manually stop it with a CTRL+C

I don’t understand your problem.

You think telegraf don’t parse alll your csv file ? If you use telegraf --test command do you see all your csv file data ?

@Meruem

Yes, telegraf has parsed my entire CSV file (249 rows for my example file), but it seemed it was keeping running and trying to keep parsing data when my entire csv example file was already parsed.
I had to do a CTRL+C to manually stop it !

I’m struggling so much understanding and mastering the entire TIG STACK (telegraf, influxdb, grafana).

I’m now trying to run the STACK in container :
https://www.youtube.com/watch?v=a6mjt8tWUws
but new problems arise.
That"s a lot of things to manage for me as I"m new to almost everything.

I spend the entire WE trying to make it working. I’m close to giving up. I have such a bad headache.
I think this is made for computer engineer.

Thanks for taking the time to answer me.

I’ll see if things get clearer in the next days. The point is I’m not sure the TIG STACK is best for my use.
All the examples are mostly for system monitoring, so directly feeding influx from the host machine, when I’m more on the IOT stuff, so data need to come from another device. Well, hard to explain in a few words.

@hary,
IoT is actually a primary use for InfluxData. I recommend taking a look at @davidgs blogs. He has tutorials on collecting data from a variety of sensors, Arduino, Raspberry Pi, and more edge devices. What is it that you’re looking to do? I struggled at first too, but that’s why we’re here. Let us know how else we can help! Also, if you’re looking to run influx in containers I recommend checking out the sandbox for starters (you’re running v1.x, right?).