Adding docker swarm node name to events

Hi! After a lot of work i managed to receive data from a Docker Swarm cluster from a apache-php microservice that i created and i can visualize it with Kibana but i have one extra thing to improve, which is the node name. I am receiving a docker.container.labels.com_docker_swarm_node_id event which is the node id (a bunch of random numbers and letters created randomly by the docker deamon), but i would like to receive a more user frendly information like the hostname of the node. I know that Filebeat, along with the other beats, send the agent.hostname and hostname fields, but those have the hostname of the container when i need the hostname of the node. How can i accomplish that?
My filebeat file is as follows:
filebeat.config:
modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false

filebeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true

processors:
- add_cloud_metadata: ~

#output.elasticsearch:
#  hosts: 'es-master:9200'

output.logstash:
  hosts: ["logstash:5044"]

#setup.kibana.host: "http://kibana:5601"
#setup.dashboards.enabled: true

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