I am currently using windows, instance/beat.go:743 Exiting: error initializing publisher: No outputs are defined. Please define one under the output section

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.

my filebeat.yml file:

filebeat.prospectors:

  • input_type: log
    paths:

    • C:\Users\rohijjai\Desktop\samplelogs\samplelogs
  • output.elasticsearch:
    hosts: ["localhost:9200"]

Note: I have checked this yml file in http://www.yamllint.com/ looks like this is valid file.

Can someone please help me?

Hi @rohit_kumar_Jain

Can you try defining the output outside of the prospector, please?

Hi Mario,

Thanks for your reply. I am not really able to understand your question. I mean I have defined the output path, isn't it correct?

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"]

You can reference the default filebeat.yml config here: https://github.com/elastic/beats/blob/ce66d6a0c81542893565008e46452ebcfd7eb51c/filebeat/filebeat.yml#L147-L150

Hey Guys,

Thank you so much for your time to reply my queries. I would really appreciate the time. The issue is fixed now.

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