ERROR instance/beat.go:933 Exiting: Error reading config file: required 'object', but found 'string' in field 'filebeat.inputs.1' (source:'filebeat.yml')

Hi, i am getting this error and not able to access my log file

`'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
filebeat.inputs:

Each - is an input. Most options can be set at the input level, so

you can use different inputs for various configurations.

Below are the input specific configurations.

  • type: log

    Change to true to enable this input configuration.

    enabled: true

    Paths that should be crawled and fetched. Glob based paths.

    paths:

  • /home/hemantkumar/elastic search training/elasticsearch-7.6.0/logs/logex/*

#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:

Array of hosts to connect to.

#hosts: ["localhost:9200"]

Protocol - either http (default) or https.

#protocol: "https"

Authentication credentials - either API key or username/password.

api_key: "id:api_key"
username: "elastic"
password: "12345678"

#----------------------------- Logstash output --------------------------------

output.logstash:
#The Logstash hosts
hosts: ["localhost:5044"]

Optional SSL. By default is off.

List of root certificates for HTTPS server verifications

#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

Certificate for SSL client authentication

#ssl.certificate: "/etc/pki/client/cert.pem"

Client Certificate Key

#ssl.key: "/etc/pki/client/cert.key"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''`

Please let me know if there is something wrong in my filebeat.yml

Hi @hemant_472, welcome to the Elastic community forums!

Could you please edit your post and enclose your Filebeat configuration file contents in ``` delimiters? That will format them and make it easier to read them.

Thanks,

Shaunak

Hi @shaunak please let me know if it is ok

filebeat.inputs:

- type: log
  enabled: true

  paths:

- /home/hemantkumar/elastic search training/elasticsearch-7.6.0/logs/logex/*
#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:

#hosts: ["localhost:9200"]

  # Protocol - either `http` (default) or `https`.
  #protocol: "https"
  api_key: "id:api_key"
  username: "elastic"
  password: "12345678"
#----------------------------- Logstash output --------------------------------
output.logstash:
  #The Logstash hosts
  hosts: ["localhost:5044"]

 

Please let me know if there is something wrong in my filebeat.yml

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