Fluent-bit: the ignore_older of tail config is of no effect

Created on 18 Aug 2018  路  6Comments  路  Source: fluent/fluent-bit

image
but锛宨n fact锛宎dd all files to scan the queue whenever the file is generated.

fixed question

Most helpful comment

@acarsercan Might late. Set parser=myparser in input plug-in tail. tail plugin will use Time_Key & Time_Format find out correct time to compare.

[PARSER]                                                                                                                                                                
    Name         myparser                                                                                                                                                 
    Format       json                                                                                                                                                   
    Time_Key     time                                                                                                                                                   
    Time_Format  %Y-%m-%dT%H:%M:%S.%L                                                                                                                                   
    Time_Keep    On
[INPUT]
    Name             tail
    Path             /var/log/containers/*.log
    Tag              containers.*
    Refresh_Interval 1
    Rotate_Wait      60
    Mem_Buf_Limit    5MB
    Skip_Long_Lines  On
    DB               /tail-db/tail-containers-state-sumo.db
    DB.Sync          Normal
    Ignore_Older 1m
    Parser  myparser

All 6 comments

image

image

I change the value of ignore_older to 1m ,the problem is the same.

The ignore_older option is only available when a Parser is specificied and that parser matched a line, so when the parser lookup the time of that specific line/record it checks if is older than ignore_older or not. It does not apply to the file age, it's record based.

Someone be kind enough to paste an example config with ignore_older & parser

Thanks

@acarsercan Might late. Set parser=myparser in input plug-in tail. tail plugin will use Time_Key & Time_Format find out correct time to compare.

[PARSER]                                                                                                                                                                
    Name         myparser                                                                                                                                                 
    Format       json                                                                                                                                                   
    Time_Key     time                                                                                                                                                   
    Time_Format  %Y-%m-%dT%H:%M:%S.%L                                                                                                                                   
    Time_Keep    On
[INPUT]
    Name             tail
    Path             /var/log/containers/*.log
    Tag              containers.*
    Refresh_Interval 1
    Rotate_Wait      60
    Mem_Buf_Limit    5MB
    Skip_Long_Lines  On
    DB               /tail-db/tail-containers-state-sumo.db
    DB.Sync          Normal
    Ignore_Older 1m
    Parser  myparser

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mbelchin picture mbelchin  路  3Comments

c0ze picture c0ze  路  3Comments

benclive picture benclive  路  3Comments

edsiper picture edsiper  路  4Comments

mhf-ir picture mhf-ir  路  4Comments