I have an app on Windows 7 that gathers data from a variety of hardware for months and writes to InfluxDB. Short of writing a Go plugin, it looks like Tail and Exec are my options. When the Tail file gets big I want to delete it and start an empty file of same name.
My code works when Telegraf is not running, but when it is running, Delete function returns with no error, but I get some “file permissions” error when trying to create a file of the same name. The old file stays visible in Windoze until I stop the Telegraf service.
Is deleting the Tail file not allowed by Telegraf? Any other ways to handle a big Tail file? Thanks for any ideas, etc.