When I run filebeat command on command prompt, it starts writing to the logs instantly. However, if I execute "filebeat modules enable system" command and then run "filebeat" command, it gives me an error
"Exiting: No paths were defined for input accessing config" and it stops writing to the log file in the logs directory.
I have set the configuration withing filebeat.yml file as follows:
#=========================== Filebeat inputs =============================
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:
#- /var/log/*.log
- D:\filebeat\logs\*
#============================= Filebeat modules ===============================
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: false
#==================== Elasticsearch template setting ==========================
setup.template.settings:
index.number_of_shards: 3
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
Because of this issue, I see no logs when I login using Kibana URL.
I ran it from within the filebeat directory. The command is
filebeat modules enable system.
After I run this command if I try running "filebeat" command, I get the error. If I disable the system module using "filebeat modules disable system" and then run "filebeat" command, the logs are written within the logs directory.
I reformatted you config above as I was hoping it would show the problem. It indicated that you haven't configured any paths but they all seem to be there. I assume the config file you posted above is in your filebeat directory?
Could you run the beat with -e -d "*" and share the output here?
2018-07-17T13:30:55.390+0530 INFO [monitoring] log/log.go:132 Total no
n-zero metrics {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":62,
"time":{"ms":62}},"total":{"ticks":108,"time":{"ms":108},"value":108},"user":{"t
icks":46,"time":{"ms":46}}},"info":{"ephemeral_id":"efef3bce-25ab-41f7-a898-e90b
65f0d29d","uptime":{"ms":96}},"memstats":{"gc_next":4194304,"memory_alloc":16754
40,"memory_total":3414520,"rss":17305600}},"filebeat":{"harvester":{"open_files"
:0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"output":{"type":"
elasticsearch"},"pipeline":{"clients":0,"events":{"active":0}}},"registrar":{"st
ates":{"current":0},"writes":{"success":1,"total":1}},"system":{"cpu":{"cores":4
}}}}}
2018-07-17T13:30:55.391+0530 INFO [monitoring] log/log.go:133 Uptime:
155ms
2018-07-17T13:30:55.391+0530 INFO [monitoring] log/log.go:110 Stopping
metrics logging.
2018-07-17T13:30:55.392+0530 INFO instance/beat.go:321 filebeat stopped
.
2018-07-17T13:30:55.393+0530 ERROR instance/beat.go:691 Exiting: No path
s were defined for input accessing config
Exiting: No paths were defined for input accessing config
Could you try to use - 'D:\filebeat\logs\*' as you path config? It seems for some reason Filebeat ignores the part under paths. Could you also remove the commented out line just to be sure id does not have any affect?
What do you get if you run ls D:\filebeat\logs\?
I see you also have the module loading enabled. Do you need it?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.