问题
I would like to know if there are any ways that a logstash configuration file can read through different documents, i.e. docx, pdf, excels, and store them into elasticsearch.
Great thanks in advance.
回答1:
Logstash cannot read .docx, .xls or .pdf files, because these sort of files are not text files, they are binary globs, only appearing to be simple after being interpreted by an application designed to parse them.
Logstash is designed to handle files that are plain-text, a good test to determine if a file could be easily read by Logstash is if you could open up the file in a text editor such as sublime, notepad or atom and read the contents, then so could Logstash.
Try opening a .docx file in notepad, that should make this clear.
来源:https://stackoverflow.com/questions/37741260/logstash-in-reading-files-documents