I need to configure filebeat to read log files from several locations and send them to logstash on user request. How can I do that?
What do you mean by user request. Do you want to send logs to logstash in specific time ?
It is no problem to send filebeat log data in specific interval, but I am not sure that is possible to send logs on user's request. I believe it is possible, but have to deal with making scripts for that purpose.
It is possible to configure reading multiple paths on following way, for example (in file filebeat.yml):
filebeat.prospectors:
- input_type: log
paths:
- /var/log/httpd/access_log.log
- input_type: log
paths:
- /var/log/httpd/error_log.log
Yml syntax requires strong text positioning in this file so as it is, without additional spaces
Is there a way to send the path as a parameter to the the filebeat.yml configuration file?
You can only configure parameters inside this file, using yml syntax.
I am so sorry, but cannot understand how to "send the path as a parameter to the the filebeat.yml". Please explain what you want.
An official filebeat docummentation says there is no such option
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-command-line.html
See beats config file format docs: https://www.elastic.co/guide/en/beats/libbeat/current/config-file-format.html
You can pass/overwrite settings using environment variables or via -E
flag.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.