Hi, I am trying to use Fluent-Bit to log IIS log f...
# fluent-bit
n
Hi, I am trying to use Fluent-Bit to log IIS log files to a HTTP source. I am using a Regex parser and can successfully extract named capture groups for all the details I wish to extract. My question is - is there a way to also send the complete log line as a JSON key as well as all the named capture groups JSON keys?
p
Use a secondary parser filter is probably the way to do it, that way you get by default the full line in tail and then you can parse it in second stage.
preserve_key
and
reserve_data
are the relevant options I think you want: https://docs.fluentbit.io/manual/data-pipeline/filters/parser You can also set to only parse it for certain outputs via a processor if that is helpful too.
If you don't provide a parser to use to
tail
it sticks the whole line under a key specified by `key`: https://docs.fluentbit.io/manual/data-pipeline/inputs/tail So, first of all you use tail to do that then you have your parser filter extract the other fields afterwards but keep the original.