如何使用Logstash加载二进制文件(pdf,xls等),而不更改其内容。
目前,我尝试加载
input {
file {
path => "C:/path/files/*"
type => "gesamt"
start_position => "beginning"
sincedb_path => "NUL"
}
}
filter {
multiline {
pattern => "/.*./gesamt"
negate => true
what => "previous"
}
base64 {
field => "blob"
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "index-name"
pipeline=>"test-pipeline"
}
}
似乎多行滤波器会损坏二进制内容。
最佳答案
您不能只将二进制文件转储到Elasticsearch中,这将使它们无法搜索,并且文件系统可能更适合于保存它们。
如果要使它们可搜索,则可能需要看看ingest attachment processor
关于elasticsearch - 如何使用Logstash加载二进制文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44958332/