Hi,
We have this setup
filebeat.autodiscover:
providers:
- type: nomad
node: {{ env "node.unique.name" }}
scope: node
address: <nomad-cluster-address>
templates:
- condition:
not:
contains:
nomad.task.name: filebeat
config:
- type: log
paths:
- /node-logs/$${data.nomad.allocation.id}/alloc/logs/$${data.meta.nomad.task.name}.stdout.*
- /node-logs/$${data.nomad.allocation.id}/alloc/logs/$${data.meta.nomad.task.name}.stderr.*
As I understand, this should prevent filebeat from harvesting the logs from the tasks containing 'filebeat' in their names.
However, when I take a look at the filebeat registry, I see a lot of log files from those tasks. Like
{"_key":"filebeat::logs::native::4386819-66305","prev_id":"","source":"/node-logs/08599431-b9c8-21c0-5fca-33a82fbaf234/alloc/logs/filebeat.stdout.0","timestamp":[754348773,1703599823],"ttl":-1,"id":"native::4386819-66305","offset":9,"type":"log","FileStateOS":{"inode":4386819,"device":66305},"identifier_name":"native"}
Am I excluding these logs in a wrong way?
Thanks!