Filebeat not working

I am using filebeat and the data is passed to logstash. My filebeat code is:

filebeat.prospectors:

  • input_type: log
    paths:
    • etc\access.log
      fields: {log_type: access}

I want to add multiple input files and create filters in logstash accordingly. Therefore, it is neccessary to give a type to each file. But when I write code till path filebeat works, if I try to add field to it the filebeat.exe closes at the moment i start it. Please tell me if I wrote a wrong code and why it is happening.

The way you should define fields is:

  fields:
    log_type: access

What are the { brackets supposed to do?

1 Like

It worked. Thank you :slight_smile:

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