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

tail new multiline support(fluentbit must be later than V1.8) #172

Merged
merged 1 commit into from Nov 24, 2021

Conversation

wenchajun
Copy link
Member

https://docs.fluentbit.io/manual/pipeline/inputs/tail#multiline-and-containers-v1.8
If you are running Fluent Bit to process logs coming from containers like Docker or CRI, you can use the new built-in modes for such purposes. This will help to reassembly multiline messages originally split by Docker or CRI:

[INPUT]
    name              tail
    path              /var/log/containers/*.log
    multiline.parser  docker, cri

Signed-off-by: chengdehao dehaocheng@yunify.com

Signed-off-by: chengdehao <dehaocheng@yunify.com>
@wenchajun wenchajun changed the title multiline support tail multiline support Nov 23, 2021
@wenchajun wenchajun changed the title tail multiline support tail new multiline support(fluentbit must be later than V1.8) Nov 23, 2021
@@ -87,6 +87,9 @@ type Tail struct {
DockerModeFlushSeconds *int64 `json:"dockerModeFlushSeconds,omitempty"`
// DisableInotifyWatcher will disable inotify and use the file stat watcher instead.
DisableInotifyWatcher *bool `json:"disableInotifyWatcher,omitempty"`
// This will help to reassembly multiline messages originally split by Docker or CRI
//Specify one or Multiline Parser definition to apply to the content.
MultilineParser string `json:"multilineParser,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not an appropriate practice to define MultilineParser as a string.

What if the parameter multiline.xxx is added later?

Maybe a struct is more reasonable.

type Multiline struct {
  Parser string
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. But there is the multiline property in the old property.

	// If enabled, the plugin will try to discover multiline messages
	// and use the proper parsers to compose the outgoing messages.
	// Note that when this option is enabled the Parser option is not used.
	Multiline *bool `json:"multiline,omitempty"`

And after testing, and if a structure is added, the following input is required for the user

DB:
      sync: xx

Not like the original

dbSync: xxx

The original configuration file is more similar to fluent-bit itself

@wanjunlei wanjunlei self-requested a review November 24, 2021 04:00
@wanjunlei wanjunlei merged commit 25bc31c into fluent:master Nov 24, 2021
@wenchajun wenchajun deleted the plugin1 branch November 25, 2021 02:32
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

Successfully merging this pull request may close these issues.

None yet

2 participants