Different grok patterns for different log lines

Hello. I have an application log file with 8 different patterns in it (8 different lines). Is it correct to use an array of match in grok to output all of them? if I use conditional expressions, only one pattern (for example INFO) is parsed and gets printed at a time (using stdout with rubydebug codec) and ERROR types are shown as messages. If I use the array, some of them work just fine but the others not. (Their fields are not separated while if I test only those lines, they are printed correctly and separated ). I am using custom patterns and I have provided logstash conf with the path of a file including all custom patterns needed. Are there any solutions for this?

Yes.

If you want more assistance you will need to provide the input data and the patterns that you expect them to match.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.