How to write filebeat prospectors with different layers for folders

my logs folder is as this:


I want one prospector for tomcat, then another prospector for jobs logs which should not include tomcat logs. (Jobs logs could have two different folder structures as above)
What is the best way for this?

one prospector for tomcat:

one prospector for jobs:


But the second will include tomcat, how to exclude tomcat logs?

- paths:
  - /logs/tomcat/*.log
  fields_under_root: true
    type: tomcat
- paths:
  - /logs/job*/**/*.log
  fields_under_root: true
    type: job

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.