I get a different error for this snippet you provided:
 Exiting: error initializing publisher: No outputs are defined. Please define one under the output section.
This could be eliminated with the following:
output.logstash:
  # The Logstash hosts
 hosts: ["localhost:5044"]
However, I still need to see your full configuration. If it contains sensitive data, just change it to x or something else.