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

new_log_group_tags parameter is not accepting variables #341

Open
OmarCherdal1997 opened this issue Jun 24, 2023 · 0 comments
Open

new_log_group_tags parameter is not accepting variables #341

OmarCherdal1997 opened this issue Jun 24, 2023 · 0 comments

Comments

@OmarCherdal1997
Copy link

OmarCherdal1997 commented Jun 24, 2023

Hello,

Please i am facing an issue tagging my newly created AWS cloudwatch log groups by fluentbit

This is my current config

  fluent-bit.conf: |
    [SERVICE]
        Parsers_File /fluent-bit/parsers/parsers.conf
    [INPUT]
        Name              tail
        Tag               kube.*
        Path              /var/log/containers/*.log
        DB                /var/log/flb_kube.db
        Parser            docker
        Docker_Mode       On
        Mem_Buf_Limit     5MB
        Skip_Long_Lines   On
        Refresh_Interval  10
    [FILTER]
        Name                kubernetes
        Match               kube.*
        Kube_URL            https://kubernetes.default.svc.cluster.local:443
        Merge_Log           On
        Merge_Log_Key       data
        Keep_Log            On
        K8S-Logging.Parser  On
        K8S-Logging.Exclude On
        Buffer_Size         32k
    [FILTER]
        Name                nest
        Match               kube.*
        Operation           lift
        Nested_under        kubernetes
    [OUTPUT]
        Name                  cloudwatch
        Match                 **
        region                eu-west-1
        log_group_name        /aws/eks/$(namespace_name)
        log_stream_name       $(pod_name)
        log_retention_days    90
        auto_create_group     true
        new_log_group_tags    source=fluentbit,name=$namespace_name

but itthrows this error
time="2023-06-24T16:42:49Z" level=error msg="InvalidParameterException: 1 validation error detected: Value '{cluster=cluster, name=$namespace_name, source=fluentbit}' at 'tags' failed to satisfy constraint: Map value must satisfy constraint: [Member must have length less than or equal to 256, Member must have length greater than or equal to 0, Member must satisfy regular expression pattern: ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$]"

does someone has any idea how to pass the namespace variable to my cloudwatch group tags list ?

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

1 participant