I created a filter as shown below.
There are three types of logs, so there are three patterns.
log A can use the message if "action" in [message].
But what about log B and log C ?
You can use grok instead of the dissect filter, but for this example I thought it was easier. What about this approach is too complicated? Trying to use grok alone will likely be more complex as well as less efficient.
The dissect filter is used to put the full string containing the key-value pairs into a field named kvpart. The mutate part then removes spaces surrounding the equals sign so that the key-value string matches the default separators. The kv filter is then applied to parse out the fields.
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.