# Remove field in output plugin

**URL:** <https://discuss.elastic.co/t/remove-field-in-output-plugin/45353>\
**Category:** Logstash\
**Created:** [March 24, 2016, 2:04pm UTC](https://discuss.elastic.co/t/remove-field-in-output-plugin/45353 "2016-03-24T14:04:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zulquarnain0110](https://avatars.discourse-cdn.com/v4/letter/z/f08c70/32.png) [@zulquarnain0110](https://discuss.elastic.co/u/zulquarnain0110)\
**Post date:** [March 24, 2016, 2:04pm UTC](https://discuss.elastic.co/t/remove-field-in-output-plugin/45353/1 "2016-03-24T14:04:05Z")

</div>

Hi Everyone,

I have a problem of day change. I google and saw the following URL

> <https://stackoverflow.com/questions/29302444/convert-timestamp-timezone-in-logstash-for-output-index-name>

My problem is that I don't want to save "index\_day" tag in elasticsearch. Is there any way to remove it or ignore it.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 24, 2016, 7:19pm UTC](https://discuss.elastic.co/t/remove-field-in-output-plugin/45353/2 "2016-03-24T19:19:20Z")

</div>

Store the day as a subfield of `@metadata`, i.e. do this:

```plaintext
code => "event['@metadata']['index_day'] = event['timestamp_zoned_obj'].strftime('%Y.%m.%d')"
...
index => "syslog-%{[@metadata][index_day]}"

```

The contents of that field is ignored by outputs. But I must repeat what I said on StackOverflow:

> The `@timestamp` field is supposed to be in UTC. Other tools (like Kibana and Elasticsearch Curator) rely on this and you shouldn't change it unless you have a really good reason.

Put more bluntly, you are wasting your time solving a non-problem.

---

<div class="post-metadata">

**Author:** ![zulquarnain0110](https://avatars.discourse-cdn.com/v4/letter/z/f08c70/32.png) [@zulquarnain0110](https://discuss.elastic.co/u/zulquarnain0110)\
**Post date:** [March 25, 2016, 1:25pm UTC](https://discuss.elastic.co/t/remove-field-in-output-plugin/45353/3 "2016-03-25T13:25:43Z")

</div>

thanks @magnusbaeck now my problem solved and I remember what you said.

---

<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:** [July 6, 2017, 5:05am UTC](https://discuss.elastic.co/t/remove-field-in-output-plugin/45353/4 "2017-07-06T05:05:22Z")

</div>

Closed on July 6, 2017, 5:05am UTC


