-
I am writing logs to a file by hour via Nginx lua, and then reading the file via vector to write the contents to kafka, but when the reading is done, the file needs to be deleted manually, which bothers me a lot. [sources.nginx_file_sources]
type = "file"
include = ["/openresty/nginx/conf/waf/log/*.log"]
data_dir = "/vector"
|
Beta Was this translation helpful? Give feedback.
Answered by
jszwedko
Aug 16, 2021
Replies: 1 comment 1 reply
-
Hi @PanHywel ! You can configure |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
PanHywel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @PanHywel !
You can configure
remove_after_secs
on thefile
source to have it remove files after they have been processed if they haven't received writes in the specified number of seconds.