We are using filebeat v 7.3 over Kubernetes. Along with pod's logs, we also want to push host logs to elasticsearch. We have mounted "/var/log/messages" of host towards the filebeat pod. The logs are successfully being pushed to elasticsearch but kubernetes metadata is not being added to logs.
Here is my fileabeat input configuration-
I'm not sure which metadata would be expected for the second block. If you are expecting host metadata, I would suggest add_host_metadata
I think filebeat looks for the pod/container information based on log path, which makes /var/log/host/messages not suitable for adding kubernetes metadata.
@pmercado After adding add_host_metdata we only get the host info such as IP and hostname which is actually of filebeat pod, not of actual host.
My only concern is that-
Can we use add_kubernetes_metadata with input type log ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.