Your output means that you do not have the field hostname in your document.
You need to use %{[host]} instead of %{[hostname]}, if you are using Logstash 8 or have the pipeline.ecs_compatibility enabled, you would need to use %{[@metadata][input][tcp][source][name]}.
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.