Config Path

Hi,
As begginner at Elastic, iam tryning to install Elastic stack on my machine (Mac IOS).
Actually i have a problem with Filebeat. i am trying to add a new index via Filebeat. Config is ok but when i run it i have always the same error that stop Filebeat. its error about config path : "No paths were defined for input accessing config".
when i run ./filebeat -e -d "*" i saw that filebeat look for "configured Path" : [/usr/local/elasticsearch/gc.log....] i never set parth config, so how should i changed it and how can i find the right path. hope that my issues is clear!
Thanks in advance for any help!

@mylyo,

You need to define some log path where you are getting system log or application log to process in your filebeat.yml file. Please refer the below sample from filebeat.yml

#=========================== Filebeat inputs =============================

filebeat.inputs:
- type: log

  # Change to true to enable this input configuration.
 enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
#  paths:
   - /var/log/syslog
    #- c:\programdata\elasticsearch\logs\*

Kindly let me know if you still get same error.

Thanks for your reply. i already defined the path to input Files. Actually i'm aiming to ingest a file and configure Filebeat to write an index, this is my config:

  filebeat.inputs:
         - type: log
          # Change to true to enable this input configuration.
          enabled: true
          # Paths that should be crawled and fetched. Glob based paths.
          paths:
                 -/my/path/to/myFile.xml
        output.elasticsearch:
          # Array of hosts to connect to.
          hosts: ["localhost:9200"]
          index: "my_index_name"
       setup.template.enabled: false

in filebeat/modules.d i enabled elasctic.yml, Kibana.yml and system.yml. I used archive distribution (.tar.gz) for installation.

@mylyo,

Can you please provide log file path like syslog or auth.log? So we can know that all the configuration is fine.

Thanks.

I can't find them :tired_face:
There no indication in installation tutorial talking about log files.
Could you tell where can i find and install it please?
Thanks,

@mylyo,

Can you please let me know the OS type of your machine where you installed filebeat?

Thanks.

Actually 1st i tried on windows OS and now i'm using Mac OS. i had the same error for both systems.

@mylyo,

Can you please specify the below path on your mac system in filebeat.yml file.

/var/log/system.log

Please restart the filebeat service after making the changes in filebeat.yml.

Also please run the below command to confirm that the filebeat is installed properly:

filebeat --version

Thanks.

filebeat --version shows the version of my Filebeat and libbeat so every thing is fine with its installation.
But i get the same error when i added /var/log/system.log in my filebeat.yml
I think i should add Es_path_config in variable system (or user i'm not sure) but i dont know the path that i should put. Should i add the path to elasticsearch/config? even there no such syslog or whatever.log inside?

@mylyo,

Have you restarted the filebeat service after making the changes in filebeat.yml?

Please share your filebeat.yml configuration again with current configuration.

No need to make any changes at Elasticsearch instance right now. Because this error is related to your filebeat configuration.

Thanks.

yes i had restarted the filebeat.
Here the last filebeat.yml config:

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /var/log/system.log
filebeat.config.modules:
   path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 3
  #index.codec: best_compression
  #_source.enabled: false
setup.kibana:
 host: "localhost:5601"
output.elasticsearch:
   hosts: ["localhost:9200"]
  #index: "my_index_name"
#setup.template.enabled: false

@mylyo,

According to above everything configuration everything seems fine. Can you please confirm that your system have system.log file. Because i never used mac so i want to cross check that file is available at mac which we have provided in path.

thanks.

there is no such file called "system.log".
I know that is the issue but i don't know how to get these files.log! and how to set the path to these files in elastic config :disappointed_relieved:

@mylyo,

No issue, just replace this file path with another file path where you are getting log.

Thanks.

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