Logstash in reading files/ documents

六月ゝ 毕业季﹏ 提交于 2020-01-06 15:30:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!