Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to configure logstash stop parsing logs under certain conditions? #39

Open
jordansissel opened this issue May 18, 2015 · 2 comments

Comments

@jordansissel
Copy link
Contributor

(This issue was originally filed by @alessiodelchiaro at elastic/logstash#2858)


Hi Guys,

Is there any chance to allow logstash stop parsing a specific log (e.g., when it reaches EOF)?

My application might generate GB of logs so I would like to remove them once those are parsed.

If it is not possible, it would be great to have this feature in a future version.

Thanks,

Alessio

@dev-head
Copy link

+1 I really want logstash to implement some flavor of post file processing.

It would be a significant improvement to have an option to stop watching a file after a configurable number of seconds since last event. That way a file input watcher could be expired; which could then make it safe for logstash to allow some post processing to the file such as: execute a script, move the file, truncate the file and or delete the file.

Right now I am relying on a fragile process that tries to remove old log files; because there's no way to guarantee all events have been processed and to have an effective cleanup process.

@jordansissel
Copy link
Contributor Author

This is a common request. I am in favor of the approach, but I'm not sure how to expose it. We'll need a design first, I think, that covers the two file modes ("read file to EOF once, then do something" vs "read file forever, but when it's idle for 24 hours, then do something")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants