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

Documentation shows built-in parser for ruby but this does not work #6050

Closed
r-gill opened this issue Sep 13, 2022 · 1 comment · Fixed by #6169
Closed

Documentation shows built-in parser for ruby but this does not work #6050

r-gill opened this issue Sep 13, 2022 · 1 comment · Fixed by #6169
Labels
docs issue Documentation Issue

Comments

@r-gill
Copy link

r-gill commented Sep 13, 2022

Bug Report

Describe the bug
Documentation shows built-in parser for ruby but this is not the case for multiline.parser

To Reproduce

  1. https://docs.fluentbit.io/manual/pipeline/filters/multiline-stacktrace lists ruby as an option for "built-in parsers with auto detection and multi format support"
  2. https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/multiline-parsing does not list ruby
  3. FluentBit container fails to starts with:
[error] [multiline] parser 'ruby' not registered
  1. Which appears to be this line in the source:
    flb_error("[multiline parser: %s] to_state='%s' is not registered",
  2. Checking the source files I can see there's no ruby as per fix fd leak in out_fluentd #2 link: https://github.com/fluent/fluent-bit/tree/ce2846b0bbff12d9951f06df1b4386e8f1111e03/src/multiline

Expected behavior
Similarly to python using ruby gives multiline support out of the box

Screenshots
Screen Shot 2022-09-08 at 7 43 25 PM

Your Environment

  • Version used: AWS for Fluent Bit 2.25.1 latest stable, which uses Fluent Bit 1.9.3
  • Configuration:
# multiline processing for Ruby
[FILTER]
    Name    multiline
    Match   *
    multiline.parser ruby
    multiline.key_content log
    mode parser
    buffer True

Note: this is the first FILTER in the configuration.

  • Environment name and version (e.g. Kubernetes? What version?): AWS ECS Fargate 1.4.0
  • Server type and version:
  • Operating System and version:
  • Filters and plugins:

Additional context
We are trying to follow the documentation but run into failure with ruby. We cannot leverage the out of the box multiline filter as we can for other languages such as python.

@patrick-stephens
Copy link
Contributor

It does indeed look like there is no ruby parser defined either for 1.9 or master and there is no relevant code for it in the repo.

Simplifying the config:

[SERVICE]
    flush                 1
    log_level             info


[INPUT]
    name                  dummy

[FILTER]
    name                  multiline
    match                 *
    multiline.key_content message
    multiline.parser      ruby

[OUTPUT]
    name                  stdout
    match                 *

Shows the same failure on both 1.9.8 and latest master version:

$ docker run --rm -it -v $PWD/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf:ro fluent/fluent-bit
Fluent Bit v1.9.8
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2022/09/16 09:35:51] [ info] [fluent bit] version=1.9.8, commit=97a5e9dcf3, pid=1
[2022/09/16 09:35:51] [ info] [storage] version=1.2.0, type=memory-only, sync=normal, checksum=disabled, max_chunks_up=128
[2022/09/16 09:35:51] [ info] [cmetrics] version=0.3.6
[2022/09/16 09:35:51] [ info] [filter:multiline:multiline.0] created emitter: emitter_for_multiline.0
[2022/09/16 09:35:51] [error] [multiline] parser 'ruby' not registered
[2022/09/16 09:35:51] [error] Failed initialize filter multiline.0
[2022/09/16 09:35:51] [error] [lib] backend failed

$ docker run --rm -it -v $PWD/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf:ro ghcr.io/fluent/fluent-bit/master:x86_64
Fluent Bit v2.0.0
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2022/09/16 09:33:42] [ info] [fluent bit] version=2.0.0, commit=c3c5471c92, pid=1
[2022/09/16 09:33:42] [ info] [storage] version=1.3.0, type=memory-only, sync=normal, checksum=disabled, max_chunks_up=128
[2022/09/16 09:33:42] [ info] [cmetrics] version=0.4.0
[2022/09/16 09:33:42] [ info] [filter:multiline:multiline.0] created emitter: emitter_for_multiline.0
[2022/09/16 09:33:42] [error] [multiline] parser 'ruby' not registered
[2022/09/16 09:33:42] [error] [lib] backend failed

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

Successfully merging a pull request may close this issue.

3 participants