0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Elasticsearch > Logstash > _ID を任意な値に設定

Posted at

document_id => に任意の値を設定でOK

output {
    elasticsearch { 
        document_id => "%{some_id_field}"
    }
}

実際の設定は以下のような感じになる

output {
  elasticsearch {
    document_id => "%{some_id_field}" # _IDをsome_id_fieldとする
    hosts => ["http://elasticsearch:9200/"]
    user => "elastic"
    password => "xxxxx"
    index => "some_index"
    ...
  }
}

参考

How does logstash generate '_id' when the outputting to elastic search? - Elastic Stack / Logstash - Discuss the Elastic Stack

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?