What I want is for every log that fails to match to be output to a file and not elastic. What is happening for me is i'm getting the grokparsefailure and its not matching my if statement stripping that and adding unmatched.
That's because your second grok filter doesn't have any expressions to match so it doesn't count as successful, and because of that remove_tag and add_tag won't do anything. But you're overcomplicating things. Just set tag_on_failure for the first grok and drop the second one.
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.