I have recently started using Logstash so still new at this. The use-case I am working on is that I want to ship a log file with Logstash that has different lengths of lines in it. The length of line (the number of attributes to be extracted) depends on a FLAG which is added right at the start of every line. To elaborate further, I have three flags and the log file contains lines similar to following:
FLAG1, TIMESTAMP, VAL1, VAL2, VAL3, VAL4, VAL6, VAL7, VAL8, VAL9
FLAG2, TIMESTAMP, VAL1, VAL2, VAL3, VAL4, VAL6, VAL7
FLAG3, TIMESTAMP, VAL1, VAL2, VAL3, VAL4, VAL6
Can someone explain how can I handle this in my filter section of config file?