fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

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

Open r-gill opened this issue 3 years ago • 1 comments

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: https://github.com/fluent/fluent-bit/blob/82d1819c655d2a74acc0a0cf7643430aa0da7d4b/src/multiline/flb_ml_rule.c#L217
  2. Checking the source files I can see there's no ruby as per #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.

r-gill avatar Sep 13 '22 17:09 r-gill

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

patrick-stephens avatar Sep 16 '22 09:09 patrick-stephens