fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Modify Tag in Lua Filter

Open mitchellmaler opened this issue 5 years ago • 4 comments

Describe the solution you'd like Currently there is no way to modify an existing tag. If the lua filter allowed you to return the tag that if modified based on logic it would fix our problem. You could create a new tag using a stream but we already use lua for a bunch of other logic and would be nice to allow it there as well to give options.

Describe alternatives you've considered Create a new steam based on a where clause to tag logs differently based on a field.

mitchellmaler avatar Jun 28 '19 19:06 mitchellmaler

hi, @mitchellmaler , we have same problem. I have a test. log. want to route different output according log line .

Example

test.log

this line want to output stdout
this line want to output  http

fluent-bit.conf

[INPUT]
   Name  tail
   path  test.log
    
[OUTPUT]
   Name  stdout
    
[OUTPUT]
   Name http

there is only one INPUT, and want to route line1 and line 2 to different output.

We can avoid this problem by set two INPUT with Tag different only. but this is not elegant at all

scuzhanglei avatar Jul 19 '19 04:07 scuzhanglei

this is a work in process feature, no fixed ETA

edsiper avatar Jul 25 '19 17:07 edsiper

this is a work in process feature, no fixed ETA

@edsiper I use stream processor for a workarround, looks good.

scuzhanglei avatar Jul 26 '19 03:07 scuzhanglei

this is a work in process feature, no fixed ETA

@edsiper I use stream processor for a workarround, looks good.

I would really like some more explanation to what, and how, you are doing this. We are currently working on setting up Fluent Bit, at work, and we want to set tags depending on log message format. Is Stream Processors something that could solve that for us?

artheus avatar Aug 10 '22 11:08 artheus