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

Add ability to specify Tag_Regex #619

Open
ypicard opened this issue Oct 21, 2021 · 1 comment · May be fixed by #1168
Open

Add ability to specify Tag_Regex #619

ypicard opened this issue Oct 21, 2021 · 1 comment · May be fixed by #1168
Labels
enhancement New feature or request

Comments

@ypicard
Copy link

ypicard commented Oct 21, 2021

Is your feature request related to a problem?
It would be nice to be able to specify a custom Tag_Regex for the tail input of the aws-for-fluent-bit helm chart.

Is your feature request related to a specific Helm chart, if yes mention name of the chart?
This is for the aws-for-fluent-bit chart.

Describe the solution you'd like
Add a variable to be able to specify the Tag_Regex param of the fluent-bit tail plugin: https://github.com/aws/eks-charts/blob/master/stable/aws-for-fluent-bit/templates/configmap.yaml

    [INPUT]
        Name              tail
        Tag               {{ .Values.input.tag }}
--->    Tag_Regex         {{ .Values.input.tagRegex }}
        Path              {{ .Values.input.path }}
        DB                {{ .Values.input.db }}
        Parser            {{ .Values.input.parser }}
        Docker_Mode       {{ .Values.input.dockerMode }}
        Mem_Buf_Limit     {{ .Values.input.memBufLimit }}
        Skip_Long_Lines   {{ .Values.input.skipLongLines }}
        Refresh_Interval  {{ .Values.input.refreshInterval }}
@ypicard ypicard added the enhancement New feature or request label Oct 21, 2021
@riccardolocci
Copy link

Kinda necroposting here, but it can be done through the input.extraInputs param, like this:

input:
  enabled: true
  tag: kube.<namespace_name>.<workload_name>.<pod_name>.<container_name>
  path: "/var/log/containers/*.log"
  db: "/var/log/flb_kube.db"
  parser: docker
  dockerMode: "On"
  memBufLimit: 5MB
  skipLongLines: "On"
  refreshInterval: 10
  extraInputs: |
      Tag_Regex     (?<pod_name>[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?<namespace_name>[^_]+)_(?<workload_name>.+)-(?<container_name>.+).log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants