# Logstash upsert not working

**URL:** <https://discuss.elastic.co/t/logstash-upsert-not-working/147423>\
**Category:** Elasticsearch\
**Created:** [September 5, 2018, 2:11pm UTC](https://discuss.elastic.co/t/logstash-upsert-not-working/147423 "2018-09-05T14:11:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![salcan](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@salcan](https://discuss.elastic.co/u/salcan)\
**Post date:** [September 5, 2018, 2:11pm UTC](https://discuss.elastic.co/t/logstash-upsert-not-working/147423/1 "2018-09-05T14:11:58Z")

</div>

Hy all,

I've some problem with the upsert .

Example:

if I have two index like

logstash-2018.06.20  
logstash-2018.06.21

and I use in Logstash's output section:

```
        action => "update"

        doc_as_upsert => "true"

        document_id => "%{monitor_id}"

```

when there is same %{monitor\_id}, the upsert doesn't work fine.

It creates same %{monitor\_id} on either index and it's not correct.

Can you help me?

Thanks,

Salvatore

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 3, 2018, 2:12pm UTC](https://discuss.elastic.co/t/logstash-upsert-not-working/147423/2 "2018-10-03T14:12:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
