You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
telegraf-1.10.0-1.x86_64
NAME="Amazon Linux AMI"
VERSION="2015.09"
Linux 66185ca101a9 4.1.17-22.30.amzn1.x86_64 #1 SMP Fri Feb 5 23:44:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
As far as I know, there isn't an efficient way to detect that a file has been deleted while writing. Opening and closing the file on every call to write would be terribly slow, and while stating the file before write would work, it would also have poor performance.
If there is a solution I have overlooked, please share. I'm not sure the use case on this, but there is a pr to add file rotation to the file output.
While my experience has shown that fsnotify is not without it's issues/caveats/limitations, I suppose it could work fine in this capacity as we wouldn't be watching a directory, but individually listed files.
Relevant telegraf.conf:
System info:
telegraf-1.10.0-1.x86_64
NAME="Amazon Linux AMI"
VERSION="2015.09"
Linux 66185ca101a9 4.1.17-22.30.amzn1.x86_64 #1 SMP Fri Feb 5 23:44:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Steps to reproduce:
If you just truncate the file, the new metric does not appear till the file grows to its previous size (filled with zeros).
Expected behavior:
If the file is deleted then at the end of the flush_interval new one appears with the new metric.
Actual behavior:
See "Steps to reproduce".
The text was updated successfully, but these errors were encountered: