-
Notifications
You must be signed in to change notification settings - Fork 846
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
upgrade "files" input with watchdog #271
Comments
Hey @DpoBoceka, I'm not opposed to adding the ability to watch and track input files. However, it's a fairly large task, so I'm not likely to take this on myself any time soon. |
I'll just leave it here in order someone would be interested. |
Some advise before I'll get to it? |
So I think this behaviour should be added to the I would propose the following additions:
Allowing users to specify their own |
I wish "file" input could support tail mode (with truncation/move detection, as in https://github.com/hpcloud/tail) and "super asterisk" as in https://github.com/influxdata/telegraf/tree/master/plugins/inputs/tail Use case: reading syslog-generated log files (rotated and/or created based on current time) |
@Jeffail Since the |
Hey @abh, it's actually the However, I think it might be difficult to map over all the different Maybe a good path would be to create a new input marked as experimental, iterate on it a few times, and if we can eventually find a way to introduce the codecs from the normal Is this something you're considering working on? If so let me know if I can help or provide any guidance, it would be awesome to finally get it done. |
Looks like https://github.com/influxdata/tail is a maintained version of https://github.com/hpcloud/tail |
There's also https://github.com/nxadm/tail which looks a bit more active. |
Just had a quick look in there and it doesn’t look like that much code, TBH. Might be worth maintaining that logic directly in Benthos. LE: This is definitely not smth we want in Benthos: https://github.com/nxadm/tail/blob/master/winfile/winfile.go I wonder if there's a separate library for it... |
Also need this. I already started to use https://github.com/nxadm/tail and it’s been good . |
For consistency consider following the SFTP "watcher" pattern. Thanks for an excellent project. |
Had a look. Its using polling. is that your point ? I think polling is also a good base to start from too. We can also add debounce too. |
this could be used as a base: https://github.com/loov/watchrun/tree/master Its using polling and also high resolution timers |
Is this feature still in processing? |
It would be nice to have an opportunity to use benthos instead of filebeat or rsyslog for simple shipping logs so it could expand its influence and conquer more use-cases. But currently benthos'es "files" input reads path just once, hence in order to ship new logs we have to restart the instance.
I also wonder if it has metadata in it to understand where benthos stopped its reading if we had it restarted.
The text was updated successfully, but these errors were encountered: