I'm trying to stop the inclusion of healthcheck log lines from being sent to Elasticsearch.
In the filestream docs there is the exclude_lines option which is an array of regex.
So if I want to filter out lines that contain /healthz or /ping then I should add in
exclude_lines: ['/healthz', '/ping']
into the "Custom configuration" in the "Collect kubernetes container logs" section in the Kubernetes integration config for the agent policy. Like the following?
I think the perhaps the issue is it's going through the json parser first so it's extracting the ndjson first before exclude... But I can't say for sure....Not at my desk at the moment...
The decoding happens before line filtering. You can combine JSON decoding with filtering if you set the message_key option. This can be helpful in situations where the application logs are wrapped in JSON objects, like when using Docker.
So perhaps use drop event processor and see if that works (it will).
Probably easy to test. Take out the json parser and see if it drops the lines,..
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.