# Logstash update document to elasticsearch problem

**URL:** <https://discuss.elastic.co/t/logstash-update-document-to-elasticsearch-problem/141550>\
**Category:** Logstash\
**Created:** [July 25, 2018, 11:31am UTC](https://discuss.elastic.co/t/logstash-update-document-to-elasticsearch-problem/141550 "2018-07-25T11:31:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivancororo](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@ivancororo](https://discuss.elastic.co/u/ivancororo)\
**Post date:** [July 25, 2018, 11:31am UTC](https://discuss.elastic.co/t/logstash-update-document-to-elasticsearch-problem/141550/1 "2018-07-25T11:31:47Z")

</div>

Hello, first of all, sorry for my English. I hope you understand me.

I´m new in ELK and I have a problem when I try to update document from logstash to elasticsearch.

In my log file, I receive a line with a date of start, and before I receive a line with a date of end. The problem is that when start time and stop time is short, Iogstash send stop time first and start time before. This is a problem because when I represent this in kibana, start time crash stop time.

log file example:

```
INICIO -> 20180725 11:00:00 
FIN -> 20180725 11:00:01 

```

output.conf:

```
output {
	elasticsearch {
		index => "index_malla_sat-%{+YYYY.MM.dd}"
		hosts => ["localhost:9200"]
		action => "update"
     doc_as_upsert => "true"
		document_id => "%{path}"
	}
} }

```

I hope you can help me.

Thanks for all.

---

<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:** [August 22, 2018, 11:43am UTC](https://discuss.elastic.co/t/logstash-update-document-to-elasticsearch-problem/141550/2 "2018-08-22T11:43:31Z")

</div>

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