Skip to content

Unable to set both a custom Index name and Date (Fluent-bit x OpenSearch) #9650

@rdvansloten

Description

@rdvansloten

Bug Report

Describe the bug
When configuring fluent-bit forOpenSearch, I can't seem to get both the Kubernetes namespace and date in the index. I want my Indexes to look like this:

MY_KUBERNETES_CLUSTER-$NAMESPACE-$DATE

So for a cluster called "mycluster" and namespace "development" this would be the result:
mycluster-namespace-2024-11-26

When enabling Logstash, I can set the date, but the clustername+namespace rendering does not work as intended. I can only do clustername+date or namespace+date. It doesn't accept a plain string next to the variable.

To Reproduce

  • Open the values.yaml file for fluent-bit Helm chart
  • Navigate to config.outputs
  • Put in
  outputs: |
    [OUTPUT]
        Name opensearch
        Match kube.*
        Host opensearch-cluster.opensearch.svc.cluster.local
        Port 9200
        HTTP_User my-user
        HTTP_Passwd redacted
        Logstash_Format Off
        Index mycluster-$kubernetes['namespace_name']
        Retry_Limit False
        tls On
        tls.verify Off
        Suppress_Type_Name On 

Expected behavior
To be able to format my indexes the way I see fit and combine all the given puzzle pieces.

Your Environment

  • Version used: Fluent Bit v3.2.1
  • Configuration: In description
  • Environment name and version (e.g. Kubernetes? What version?): AKS 1.30.0
  • Server type and version:
  • Operating System and version: Linux
  • Filters and plugins: Whatever comes with the Helm chart

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions