We are trying to recursively capture logs from a file tree that gets quite deep. According to the documentation here: filestream input | Filebeat Reference [8.8] | Elastic
This states that: "If enabled it expands a single ** into a 8-level deep * pattern."
Is there any way to increase the depth? Using multiple ** does not work. e.g. /**/**/
Can you share an example of the path and what is your configuration?
From the documentation you just need to set it to /path/** and it will expand until 8 levels deep, if your path is more than 8 levels deep you will need to adjust and use the ** further in the path, something like /path/level1/level2/level3/**.
We are capturing log files from all jobs running in our Jenkins instance.
Given how Jenkins creates it's directory structure we can capture up to three directories deep. Like this:
Adding directory_1 to our filebeat config is OK, but adding more than that makes the configuration too static. There is also no limitation on how many subfolders can be used within Jenkins.
So if we had another job with a path like this, we would not be able to capture it:
Not sure if there is something you can do besides add a lot of static prefixes.
Filebeat has this limitation on the recursive glob that will expand 8 levels only and I'm not sure you can add other globs in the path.
So you would need to add the static prefixes or depending on your needs use other log collector tool, If i'm not wrong vector from datadog does not have this glob expansion limitation and can also ship to Elasticsearch.
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.