Unable to use external id for elasticsearch / elasticsearch_http

Description

I am trying to use the ID of the object I am passing through as the document id. Below is my logstash config. However instead of seeing the actual id in output in ES, I see the literal "%{id}" as the ID.

input {
syslog {
}
}

output {
elasticsearch_http {
host => "localhost"
flush_size => 1
index => "index-%{+YYYY.MM.dd}"
index_type => "type"
template => "template.json"
template_name => "mytemplate"
document_id => "%{id}
}
}

Status

Assignee

Logstash Developers

Reporter

Priyank Bagrecha

Affects versions

Configure