Skip to content

Commit

Permalink
Merge pull request #1352 from smallc2009/feature/add-skip-empty-lines…
Browse files Browse the repository at this point in the history
…-tail

Feat: Add skip empty lines in tail input
  • Loading branch information
wenchajun authored Sep 21, 2024
2 parents d4efd14 + 3b8818e commit f03a42c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 0 deletions.
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

0 comments on commit f03a42c

Please sign in to comment.