1

Using the 'tail' input plugin I'd like to include information from the filename into the message. I can parse the filename (from the tag) and modify it, but not able to include any info from it in the (stdout) output.

vbence
  • 20,084
  • 9
  • 69
  • 118

1 Answers1

2

Specifying a Path_Key to tail will add the file name to the record. The parser filter can be used to extract information as individual fields.

vbence
  • 20,084
  • 9
  • 69
  • 118
  • If you need to able to extract information from the `Path_Key` field value, the only way I could figure out how to do this was by using a [Lua filter](https://docs.fluentbit.io/manual/pipeline/filters/lua). There is some information about how to do this in my answer over at https://stackoverflow.com/a/65194639/396490 – jerrykan Dec 08 '20 at 07:21