Hello
I have a bunch of log files which I like to read into my influxDB, currently when I start the telegraph I see that the log files are detected but only changes are passed to the influxdb. This tailing is perfect for me going forward.
But how do I get the “old” data into the influxdb?
Thanks a lot for a hint!
Michael
You need to add a parameter in your telegraf input plugin config: from_beginning = true
Thanks that works perfectly well!
I am still running an import, and did not find an answer in the docs…
How is the behavior when I run this a second time? Will it duplicate or only add what is missing?
In case I want to set the flag back to false, I would need to restart the telegraf what would lead to a little loss of data. How could I best deal with that?
On a second run, it will override any existing entries that share the same timestamps. Any non-existing ones will be added. It will still continue tailing the file even if you have the from_beginning flag set to true.
So if you had an entry at 8:00am that you input today, and you changed that entry a little (but the timestamp is still 8:00am), the modified entry would be stored at that 8:00am timestamp on the second run.
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.