Hi there.
I’m trying to define a system job running filebeat to ship the logs to a central location. I’ve searched around here and there were a custom filbeat image implementing the autodiscover for nomad. It as been merged and it’s now available in the official filebeat image. Autodiscover | Filebeat Reference [7.15] | Elastic
But I can’t get it to actually collect the logs. I’m using this job template, running as a system job :
filebeat.autodiscover:
providers:
- type: nomad
node: {{ env "node.unique.name" }}
address: http://{{ env "attr.unique.network.ip-address" }}:4646
secret_id: "REDACTED"
hints.enabled: true
allow_stale: true
templates:
- condition:
equals:
nomad.namespace: "default"
config:
- type: log
paths:
- /var/nomad/alloc/${data.meta.alloc_id}/alloc/logs/${data.meta.task.name}.stderr.[0-9]*
- /var/nomad/alloc/${data.meta.alloc_id}/alloc/logs/${data.meta.task.name}.stdout.[0-9]*
ignore_older: 24h
output.logstash:
hosts: ['https://REDACTED:8200']
ssl:
verification_mode: 'none'
Do someone have a clue on how to ship logs from nomad using filebeat ?