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

YAML support for sequences not working in the SERVICE section #9508

Closed
niedbalski opened this issue Oct 21, 2024 · 1 comment
Closed

YAML support for sequences not working in the SERVICE section #9508

niedbalski opened this issue Oct 21, 2024 · 1 comment

Comments

@niedbalski
Copy link
Collaborator

Bug Report

Describe the bug

When using YAML sequences (lists) under the service stanza in a Fluent Bit configuration file, the parser throws an error and fails to process the configuration. This prevents users from specifying multiple values in certain keys that could benefit from list support (e.g., parser_file with multiple parser files).

The following configuration render invalid when sequences are set on the parser_file under the service stanza.

service:
  log_level: info
  http_server: on
  http_listen: 0.0.0.0
  http_port: 443
  parser_file:
    - 'parser--docker.yaml'
    - 'parser--syslog-rfc5424.yaml'

includes:
  - 'default--inclusion-test.yaml'

pipeline:
  inputs:
    - name: dummy
    - name: tail
      path: /var/log/docker.log
      parser: docker
  outputs:
    - name: stdout
      match: '*'

docker run -v $(pwd)/test.yaml:/config/fluent-bit.yaml ghcr.io/fluent/fluent-bit/unstable:latest-debug /fluent-bit/bin/fluent-bit -c /config/fluent-bit.yaml -vvvv
Fluent Bit v3.2.0 | NIGHTLY_BUILD=2024-10-21-06_06_27 - DO NOT USE IN PRODUCTION!

  • Copyright (C) 2015-2024 The Fluent Bit Authors
  • Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
  • https://fluentbit.io/

| | | | | | ___ () | |__ |/ __
| |_ | |_ _ ___ _ __ | |_ | |/ /| |_ __ __ / /`' / /'
| | | | | | |/ _ \ ' | | | ___ \ | | \ \ / / \ \ / /
| | | | || | _/ | | | | | |/ / | |_ \ V /.
/ /./ /
__
_| ||_,|___|| ||_| _/||_| _/ _()____/

[2024/10/21 08:43:20] [error] [config] YAML error found in file "/config/fluent-bit.yaml", line 7, column 4: unexpected event 'sequence-start-event' (7) in state 'section-value' (5).

Expected behavior

Configuration is valid and parsed correctly.

Your Environment

Latest fluent-build master build.

@edsiper
Copy link
Member

edsiper commented Oct 28, 2024

the example above is invalid. For parsers and multiline parsers the format has been extended, here is the PR which works as a reference: #9513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants