Filebeat fails to start for multiple prospectors(Exiting: error loading config file: yaml: line 16: did not find expected key)

Please use the </> button to format config files and logs.

YAML is sensitive to indentation. That is, do use spaces and no tabs and try to indent with exactly 2 spaces per level. The formatting in your sample config looks completely off.

corrected (filebeat 5.x required)

filebeat.prospectors:
- input_type: log
  paths:
    - 'C:\softwares\syslog'
  fields.log_type: syslog
- input_type: log 
  paths:
    - 'C:\softwares\cdr_test.log'
  fields.log_type: cdr

interestingly you don't have 16 lines in your sample, so the parsing might finally (well, it's already off) break somewhat later in your config file.

1 Like