alex_jelimalai
alex_jelimalai

Reputation: 11

How to load binary files with Logstash

How to load binary files (pdf, xls, other...) with Logstash and not changing their content.

Currently I try to load with

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"
 }
}

It seems that multiline filter damages the binary content.

Upvotes: 0

Views: 2018

Answers (1)

alr
alr

Reputation: 1804

You cannot just dump binary files into Elasticsearch, this will not make them searchable, and a filesystem might be better suited to hold them.

If you want to make them searchable, you might want to take a look at the ingest attachment processor

Upvotes: 1

Related Questions