The parsing works fine, I see no need for a message.
The issue I’m finding is having a line with 700+ chars in git and editors is not optimal.
Is there a way to build the grok-pattern over multiple lines, with an << or += operator perhaps?
Yes, the message looks very much as a csv-row in this example, but in our real config there is multiple “match”-lines and the input varies in number of columns.
The first and second column determines what column has what values.
The idea with CSV is good and I did not think of it, will try and see if we can use it.
Not sure which are better performances, CSV or dissect, you can try both in your case. The dissect filter is ~10x faster than grok. However csv is much more useful if you have pure csv format.
This is not an issue, if you have different types of message you can still combine othe filters or use conditional to correctly parse it.
Not clear what you mean with this, without you sharing sample of messages is pretty complicated to provide any insight.
The main thing is that while grok can parse almost anything, sometimes you can use other parse filters or combination of other parse filters to make things easier.
Personally I only use grok as the last option, when a message cannot be parsed using other filters or combination of filters.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.