Skip to content

Feature Request - Adding Logged filename to the metadata #8226

@OfirYaron

Description

@OfirYaron

Is your feature request related to a problem? Please describe.
I'm currently working on a logging setup where my Kubernetes cluster, running on AWS EKS, generates logs across approximately 20 files. The challenge I'm encountering revolves around the static nature of the Fluent Bit configuration. Each new log file necessitates a manual addition of output/input configurations, and this has become a bit cumbersome as the number of files grows.

Describe the solution you'd like

Describe alternatives you've considered
I'm envisioning a feature that introduces dynamic index routing based on the filename. Ideally, a syntax akin to ${@metadata__filename} could be incorporated into the Elasticsearch output plugin configuration. This would allow Fluent Bit to dynamically generate indices based on the source filename, providing a seamless solution for ingesting logs from multiple files without the need for constant manual intervention.

A sample configuration might look like this:

[OUTPUT]
    Name         es
    Match        kube.*
    Host         your-elasticsearch-host
    Port         9200
    Logstash_Format On
    Index        ${@metadata__filename}

Additional context
I understand that feature development involves careful consideration, and I appreciate your time and efforts in evaluating this request. Your continuous dedication to refining Fluent Bit is truly commendable.
Thank you for your attention, and I look forward to any insights.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions