diff --git a/apis/fluentbit/v1alpha2/plugins/input/tail_types.go b/apis/fluentbit/v1alpha2/plugins/input/tail_types.go index 6ca911470..d974d75d0 100644 --- a/apis/fluentbit/v1alpha2/plugins/input/tail_types.go +++ b/apis/fluentbit/v1alpha2/plugins/input/tail_types.go @@ -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 { @@ -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 } diff --git a/apis/fluentbit/v1alpha2/plugins/input/zz_generated.deepcopy.go b/apis/fluentbit/v1alpha2/plugins/input/zz_generated.deepcopy.go index 0f7b7f388..399a574b1 100644 --- a/apis/fluentbit/v1alpha2/plugins/input/zz_generated.deepcopy.go +++ b/apis/fluentbit/v1alpha2/plugins/input/zz_generated.deepcopy.go @@ -487,6 +487,11 @@ func (in *Tail) DeepCopyInto(out *Tail) { *out = new(bool) **out = **in } + if in.SkipEmptyLines != nil { + in, out := &in.SkipEmptyLines, &out.SkipEmptyLines + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tail. diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml index cdbaaaee3..aacf75b01 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml @@ -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), diff --git a/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml index cdbaaaee3..aacf75b01 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml @@ -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), diff --git a/docs/plugins/fluentbit/input/tail.md b/docs/plugins/fluentbit/input/tail.md index 41f7cf0f7..3e024d94b 100644 --- a/docs/plugins/fluentbit/input/tail.md +++ b/docs/plugins/fluentbit/input/tail.md @@ -33,3 +33,4 @@ The Tail input plugin allows to monitor one or several text files.
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 | diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index c29cd154d..00e34885f 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -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), diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index 023bea4eb..138a029ca 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -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),