# Output logs with date of indexing Logstash

**URL:** <https://discuss.elastic.co/t/output-logs-with-date-of-indexing-logstash/69000>\
**Category:** Logstash\
**Created:** [December 14, 2016, 10:12am UTC](https://discuss.elastic.co/t/output-logs-with-date-of-indexing-logstash/69000 "2016-12-14T10:12:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lifesaver13](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@lifesaver13](https://discuss.elastic.co/u/lifesaver13)\
**Post date:** [December 14, 2016, 10:12am UTC](https://discuss.elastic.co/t/output-logs-with-date-of-indexing-logstash/69000/1 "2016-12-14T10:12:27Z")

</div>

```
 Hey everbody,

```

I'am moving olds Elasticsearch logs (2.2.0) to a higer version (5.0.2) with Logstash. It's working but I can't index the logs in the new version with the date of indexing of the old logs.

I'm using the following conf structure :

input  
{  
elasticsearch  
{  
hosts =\> ["localhost:9200"]  
index =\> "old-logs\*"  
}  
}

output  
{  
elasticsearch  
{  
hosts =\> ["localhost:9201"]  
index =\> "old-logs..." # looking for index with the date of indexing #  
}  
stdout { codec =\> rubydebug }  
}

I don't know how to index the logs with there date...

Can anybody help me?

J.S

---

<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:** [January 11, 2017, 10:13am UTC](https://discuss.elastic.co/t/output-logs-with-date-of-indexing-logstash/69000/2 "2017-01-11T10:13:27Z")

</div>

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