Obviously, if you're not sure you can to extract the Message field from every event, you can make two grok filters and put the second one (the one on Message) in a condition like if [Message] { ...grok filter...}.
Also, just check if there's any event with a different pattern which breaks the first grok. That is up to you.
So, first of all when posting some code (or anything which is not plain writing) please format it, or it'll be impossible to read for us.
So use any editor (VSCode, Atom, Sublime or whatever) to properly indent your code, paste it here properly indented, highlight it and click on the Preformatted tool ( ).
Speaking of your question, I don't really get what you mean by
it uses the default mapping template
Plus, if I insert something in my pipeline (like the break_on_match => false in the grok, why did you remove it?
Finally, can you post here some outputs of the following pipeline (output will be in your standard output, so your terminal):
I do not have access to my laptop right now but I can tell you the steps to follow:
extract the state from the Message field using a grok again with a break_on_match: false
use a translate filter or a ruby filter. The translate one is kinda trivial to use (it's basically a dictionary) and you can see an example on the logstash documentation.
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.