I am trying to figure out the best possible method for enabling log rotation.
The beats is deployed in Kubernetes as daemon set, its input file is stored in a shared location accessed by multiple pods, writing to it.
As suggested by docs, when I tried to rename the log file and create a new file, Application was not able to detect the new file and kept writing to the rotated log file. In order for the application to detect the new file, restart will be required but that might lead to data loss.
Copy and truncate seems to be an option, but that leads to data loss in filebeat.
Is there any way to over come this..
Thank you for your help in advance!