Logstash读取文件/文档 [英] Logstash in reading files/ documents

查看:735
本文介绍了Logstash读取文件/文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道logstash配置文件是否可以通过各种方式读取不同的文档,例如docx,pdf,excel,并将它们存储到elasticsearch中.

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.

非常感谢.

推荐答案

Logstash无法读取.docx,.xls或.pdf文件,因为这类文件不是文本文件,它们是二进制文件,看上去很简单在被旨在解析它们的应用程序解释后.

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设计用于处理纯文本文件,这是确定Logstash是否可以轻松读取文件的好方法,即是否可以在 text 编辑器(例如升华,记事本或原子并读取内容,Logstash也可以.

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.

尝试在记事本中打开.docx文件,这应该使它变得很清楚.

Try opening a .docx file in notepad, that should make this clear.

这篇关于Logstash读取文件/文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆