Trouble selecting beats inputs

Hello!

So, i'm trying to select two different types of input files from the same directory. I add a different tag depending on the type of file so that I can later use different grok patterns to process the logs, based on the different tags.

This is my current input:

filebeat.inputs:
- type: log
  paths:
  - /var/log/conn/*/*/*.results
  tags: ["delivery_conn_results"]
- type: log
  paths:
  - /var/log/conn/*/*/!(*.results)
  tags: ["delivery_conn_total"]

And my files look like this:

Captura de ecrã 2020-06-04, às 19.00.55

I'm succeeding at getting the "XXX.results" files, but now the other ones.

What should I do?

Hello again!

I solved this issue by using "exclude_files" like this:

filebeat.inputs:
- type: log
  paths:
  - /var/log/conn/*/*/*.results
  tags: ["delivery_conn_results"]
- type: log
  paths:
  - /var/log/conn/*/*/*
  exclude_files: ['\.results$']
  tags: ["delivery_conn_total"]

Here is more info on how to use exclude_files.

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