Hi everyone, I have the following ouput configuration file:
output {
if "_jdbcstreamingdefaultsused" in [tags] {
elasticsearch {
hosts => ["esdatahot01.siacloud.es:9200","esdatahot02.siacloud.es:9200"]
index => "unknown-%{customer}-safecert_certificados-bbdd"
}
}
if ([id_certificado]) {
if "updated" in [tags] {
elasticsearch {
hosts => ["esdatahot01.siacloud.es:9200","esdatahot02.siacloud.es:9200"]
index => "log-%{customer}-safecert_certificados-bbdd"
action => "update"**
doc_as_upsert => "true"**
document_id => "%{id_copy}"**
}
}
else if "deleted" in [tags] {
elasticsearch {
hosts => ["esdatahot01.siacloud.es:9200","esdatahot02.siacloud.es:9200"]
index => "log-%{customer}-safecert_certificados-bbdd"
action => "delete"
document_id => "%{id_copy}"
}
}
}
}
As you can see Im using the field id_copy as document_id to update the current documents in ES index but when this id end with 0 ES delete it and add E+5
Im getting duplicates for this reason...
I have tried changing the type to string and integer but doesnt work... and as I said this only happend when end with a 0 all the others documents have been updated correctly
Any idea?
Thx