Just get the contents of the sub_type field, skip all other, not match each field。Because the message data format is random, i can't use fixed filtering rules. How can I achieve this?
Thank you, I know this way, but I don't know how to deal with grok. I only see that the grok can be processed one by one. I don't see how to implement the ignore skip processing.Do you know the method of grok?
A grok expression is basically a regular expression so you can use wildcards to ignore the parts you're not interested in. The grok expression sub_type=%{WORD:subtype} will find a subtype anywhere in the input string and extract a field from it, but it will also find bogus string like "whatever_sub_type=foo" so some care is needed.
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.