I think the easiest way to do that is, like you suggest, with conditions.
According to the documentation, you can use regexp in conditions. So, you have to create a regex who recognised every message who end with the substring, if the pattern match your message then drop the event.
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.