If by ignore you mean "discard all other events and not even index them", you can start your filter with a condition to drop the messages that won't match a regexp !~ looking for log contents that start with ^ your desired string. The curly bracket must be escaped \{.
That is:
if [message] !~ /^\{ "central-logging": "true"/ {
drop { }
}
Having said that, if you may want to process the other lines in the future, it may be worth taking a look at the json filter and set conditions depending on the existence or value of "central-logging".
So, either you discard all the other messages (as I have described in my previous comment) or you add a condition in the output section to log only the messages that match =~ your string.
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.