Now I'm using -e
to start filebeat. But I'm going to collect logs in the files, can I config filebeat to send its own logs to Elasticsearch?
Hi,
you need to ensure that Filebeat is logging to a file. You can do this by setting the logging.to_files
option to true
in your filebeat.yml
configuration file:
logging.to_files: true
logging.files.path: /var/log/filebeat
logging.files.name: filebeat.log
This will make Filebeat log its output to a file named filebeat.log
.
Then you need to set up Filebeat to read its own log file and send it to Elasticsearch. You can do this by adding a new input to the filebeat.inputs
section of your filebeat.yml
configuration file:
filebeat.inputs:
- type: log
paths:
- /var/log/filebeat/filebeat.log
Regards
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.