I am currently using windows while running filebeat -e -c filebeat.yml -d "publish" command in order to post logs to ES, I am getting this error:
instance/beat.go:743 Exiting: error initializing publisher: No outputs are defined. Please define one under the output section. Exiting: error initializing publisher: No outputs are defined. Please define one under the output section.
From the code you posted, it looks like your output.elasticsearch: is nested below filebeat.prospectors:, which would cause an error when parsed by filebeat.
Your output.elasticsearch: should look like this:
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
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.