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

Record accessors with hyphens or dashes not working in cloudwatch_logs output plugin #329

Open
sjhuang93 opened this issue May 18, 2023 · 0 comments

Comments

@sjhuang93
Copy link

Describe the question/issue

Record accessors with hyphens or dashes not working in cloudwatch_logs output plugin

Configuration

[OUTPUT]
    Name                  cloudwatch_logs
    Match                 *
    region                ap-northeast-1
    log_group_name        /eks/test
    log_group_template    /eks/$(kubernetes['namespace_name'])/$(kubernetes['container_name'])
    log_stream_prefix     bit
    log_stream_template   $(kubernetes['namespace_name'])/$(kubernetes['container_name']).cloudwatch_log
    log_key               log

Fluent Bit Log Output

[2023/05/18 03:13:14] [error] [record accessor] bad input character '(' at line 0
[2023/05/18 03:13:14] [error] [lib] backend failed
[2023/05/18 03:13:14] [error] [record accessor] bad input character ')' at line 0
[2023/05/18 03:13:14] [error] [record accessor] bad input character '/' at line 0
[2023/05/18 03:13:14] [error] [record accessor] syntax error, unexpected '$', expecting $end at '$(kubernetes['namespace_name'])/$(kubernetes['container_name'])'
[2023/05/18 03:13:14] [error] [output:cloudwatch_logs:cloudwatch_logs.0] Could not parse `log_group_template`
[2023/05/18 03:13:14] [error] [output:cloudwatch_logs:cloudwatch_logs.0] Initialization failed
[2023/05/18 03:13:14] [error] [output] failed to initialize 'cloudwatch_logs' plugin

Fluent Bit Version Info

image:
  public.ecr.aws/aws-observability/aws-for-fluent-bit:2.31.11
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