fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Support a directory as input, with subdirectories

Open spellr opened this issue 4 years ago • 30 comments

Is your feature request related to a problem? Please describe.

The problem is that it's not possible to set a entire directory in INPUT, and get all the logs in the directory including subdirectories.

Using the tail plugin, I can set:

[INPUT]
    Name      tail
    Path      /var/log/*

But it will only get the files immediately under /var/log

Describe the solution you'd like

The way to achieve this in FluentD is to use **, which matches recursively subdirectories. We can have the same solution here.

Describe alternatives you've considered

Maybe a flag recursive=True, but I guess it's less intuitive and harder to code.

Additional context

spellr avatar Apr 21 '20 07:04 spellr

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 31 '21 02:05 github-actions[bot]

bump

dsalvet avatar May 31 '21 08:05 dsalvet

bump

What is the status here? This seems like a very important feature

vnedyavila avatar Oct 19 '21 18:10 vnedyavila

This would be a super useful feature.

servo1x avatar Nov 01 '21 12:11 servo1x

Any ideas about on which version of fluent-bit can we expect this feature implementation...

sujairamprasathc avatar Jan 06 '22 12:01 sujairamprasathc

I would love to have this feature. I have a web server which hosts 100s of web apps/services (kind of microservice but not containers). It would be hard to configure and maintain 100s of paths (and removing and adding paths as services are added/removed) vs just having to point to the root of the web servers hosting path and get all log files in subdirectories.

rohit-mundayadan avatar Feb 16 '22 14:02 rohit-mundayadan

I love the feature very much. I maintain a server which has multiple daemons to write logs to certain directory, but on different sub directories. It would be very useful if the feature gets implemented which would help the configuration as clean as possible.

JasonMars avatar Feb 24 '22 12:02 JasonMars

Having this feature would be great! There isn't really a workaround (that I can think of) for this, so it's blocking me from using fluentbit

HarleyB123 avatar Mar 08 '22 16:03 HarleyB123

I'm not sure this will help out in any generic case, but perhaps help to those who have been looking for this feature! I recently had a use-case where I needed to collect the json-file logging driver output from the docker daemon and stumbled on this solution for fluent-bit that does indeed tail each container log file matching this pattern: /var/lib/docker/containers/<container_id>/<container_id>-json.logs

    [INPUT]
        Name             tail
        Path             /var/lib/docker/containers/*/*-json.log
        ...

stevenolen avatar Mar 09 '22 12:03 stevenolen

@stevenolen That case only suit for specific case..

    [INPUT]
        Name             tail
        Path             /a/b/c/d/*/*.log
        ...

only find files in path such as /a/b/c/d/e/*.log , not for /a/b/c/d/e/f/g/*.log

da-head0 avatar Apr 22 '22 02:04 da-head0

We still need this feature

izeal avatar Jul 04 '22 10:07 izeal

bump

mfolivas avatar Aug 03 '22 03:08 mfolivas

bump

jhaldar22 avatar Aug 23 '22 10:08 jhaldar22

+1 vote for this feature. One option to create symlinks and the symlink files can be in one directory.

linczy avatar Dec 15 '22 13:12 linczy

+1

SubhraB avatar Jan 27 '23 16:01 SubhraB

+1

umialpha avatar Feb 24 '23 09:02 umialpha

+1

wiperpaul avatar May 10 '23 12:05 wiperpaul

+1

yjagdale avatar Aug 07 '23 11:08 yjagdale

+1

skiedude avatar Aug 21 '23 18:08 skiedude

+1

Shreeraj-D avatar Aug 21 '23 23:08 Shreeraj-D

+1

YikaiHu avatar Sep 25 '23 08:09 YikaiHu

+1

barabasakos avatar Nov 07 '23 15:11 barabasakos

It is supported in Vector File source with globbing

[sources.my_source_id]
type = "file"
include = [ "/var/log/**/*.log" ]

air3ijai avatar Nov 10 '23 12:11 air3ijai

Any update, please?

rairajiv-trellix avatar Dec 11 '23 09:12 rairajiv-trellix

Would also like.

johnmmcgee avatar Feb 13 '24 03:02 johnmmcgee

+1

conawolenr avatar Mar 20 '24 20:03 conawolenr

+1

blchilders avatar Mar 29 '24 19:03 blchilders

+1

cazorla19 avatar Apr 12 '24 09:04 cazorla19

+1

murrayconnorstewart avatar Apr 24 '24 15:04 murrayconnorstewart