Filebeat Ansible Tags

Hi,

I'm trying to pass tags using an ansible variable from each beats host, so that I can filter on those tags inside Kibana. I've tried several methods, but the tags don't seem to show.

Whats the best way to achieve this?

Thanks,

Chris

I used to do this in logstash pipelines during development debugging, but I've removed the code since then.

You would need to template your beats config files, then it would be something like this:

processors:
- add_tags:
    tags: [ {{ ansible_fqdn }} ]

You could use ansible_hostname for the shorter name.

Thanks @rugenl That did the trick!

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