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

Feat: Add skip empty lines in tail input #1352

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apis/fluentbit/v1alpha2/plugins/input/tail_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ type Tail struct {
// Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached.
// +kubebuilder:validation:Enum:=on;off
PauseOnChunksOverlimit string `json:"pauseOnChunksOverlimit,omitempty"`
//Skips empty lines in the log file from any further processing or output.
SkipEmptyLines *bool `json:"skipEmptyLines,omitempty"`
}

func (_ *Tail) Name() string {
Expand Down Expand Up @@ -191,5 +193,8 @@ func (t *Tail) Params(_ plugins.SecretLoader) (*params.KVs, error) {
if t.PauseOnChunksOverlimit != "" {
kvs.Insert("storage.pause_on_chunks_overlimit", t.PauseOnChunksOverlimit)
}
if t.SkipEmptyLines != nil {
kvs.Insert("Skip_Empty_Lines", fmt.Sprint(*t.SkipEmptyLines))
}
return kvs, nil
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,10 @@ spec:
a file once is rotated in case some pending data is flushed.
format: int64
type: integer
skipEmptyLines:
description: Skips empty lines in the log file from any further
processing or output.
type: boolean
skipLongLines:
description: |-
When a monitored file reach it buffer capacity due to a very long line (Buffer_Max_Size),
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,10 @@ spec:
a file once is rotated in case some pending data is flushed.
format: int64
type: integer
skipEmptyLines:
description: Skips empty lines in the log file from any further
processing or output.
type: boolean
skipLongLines:
description: |-
When a monitored file reach it buffer capacity due to a very long line (Buffer_Max_Size),
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/fluentbit/input/tail.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ The Tail input plugin allows to monitor one or several text files. <br /> It has
| multilineParser | This will help to reassembly multiline messages originally split by Docker or CRI Specify one or Multiline Parser definition to apply to the content. | string |
| storageType | Specify the buffering mechanism to use. It can be memory or filesystem | string |
| pauseOnChunksOverlimit | Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached. | string |
| skipEmptyLines | Skips empty lines in the log file from any further processing or output. | *bool |
4 changes: 4 additions & 0 deletions manifests/setup/fluent-operator-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2922,6 +2922,10 @@ spec:
a file once is rotated in case some pending data is flushed.
format: int64
type: integer
skipEmptyLines:
description: Skips empty lines in the log file from any further
processing or output.
type: boolean
skipLongLines:
description: |-
When a monitored file reach it buffer capacity due to a very long line (Buffer_Max_Size),
Expand Down
4 changes: 4 additions & 0 deletions manifests/setup/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2922,6 +2922,10 @@ spec:
a file once is rotated in case some pending data is flushed.
format: int64
type: integer
skipEmptyLines:
description: Skips empty lines in the log file from any further
processing or output.
type: boolean
skipLongLines:
description: |-
When a monitored file reach it buffer capacity due to a very long line (Buffer_Max_Size),
Expand Down
Loading