Skip to content

[Fluent-Bit] Please enable Offset_Key option for tail input plugin. #1422

@mbhegde-orcl

Description

@mbhegde-orcl

Is your feature request related to a problem? Please describe.

This is a configuration option available in the upstream fluent-bit (https://docs.fluentbit.io/manual/pipeline/inputs/tail - Cmd+F for "Offset_Key") but not in fluent-bit clusterinput.

If there's a way to bypass the operator CRD and directly specify this, that will also work.

Describe the solution you'd like

Something like

diff --git apis/fluentbit/v1alpha2/plugins/input/tail_types.go apis/fluentbit/v1alpha2/plugins/input/tail_types.go
index 33dd6707..cccc04e0 100644
--- apis/fluentbit/v1alpha2/plugins/input/tail_types.go
+++ apis/fluentbit/v1alpha2/plugins/input/tail_types.go
@@ -101,6 +101,8 @@ type Tail struct {
 	PauseOnChunksOverlimit string `json:"pauseOnChunksOverlimit,omitempty"`
 	//Skips empty lines in the log file from any further processing or output.
 	SkipEmptyLines *bool `json:"skipEmptyLines,omitempty"`
+	//If enabled, Fluent Bit appends the offset of the current monitored file as part of the record.
+	OffsetKey *bool `json:"offsetKey,omitempty"`
 }
 
 func (_ *Tail) Name() string {
@@ -196,5 +198,8 @@ func (t *Tail) Params(_ plugins.SecretLoader) (*params.KVs, error) {
 	if t.SkipEmptyLines != nil {
 		kvs.Insert("Skip_Empty_Lines", fmt.Sprint(*t.SkipEmptyLines))
 	}
+	if t.OffsetKey != nil {
+		kvs.Insert("Offset_Key", fmt.Sprint(*t.OffsetKey))
+	}
 	return kvs, nil
 }

Additional context

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions