I need to pass a field from filebeat to kafka viz. host which is nothing but the host name of the machine from the logs are read. Though Filebeat sends the hostname in the beat properties, I need this in a separate field so that it conforms to the kafka topic's expected schema. Right now, I have created a field as
Though this works, I would like to know if there is a better way of achieving this such as using any variable in beat itself. Any help will be appreciated.
What do you mean by "any variable in beat itself"?
Environment variables or command line flag ( -E computername=xyz) are the only things I can think of other than using some outside tool to manage the configuration file.
Hi Andrew, thanks for the quick reply. What I meant by beat variable is that I can see by default beat sends the host name inside beat.hostname. So, is there a way to reuse that in a custom field rather than using an environment variable?
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.