# ADD a Counter for Every build

**URL:** <https://discuss.elastic.co/t/add-a-counter-for-every-build/158687>\
**Category:** Elasticsearch\
**Created:** [November 29, 2018, 6:12am UTC](https://discuss.elastic.co/t/add-a-counter-for-every-build/158687 "2018-11-29T06:12:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrashid](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mrashid](https://discuss.elastic.co/u/mrashid)\
**Post date:** [November 29, 2018, 6:12am UTC](https://discuss.elastic.co/t/add-a-counter-for-every-build/158687/1 "2018-11-29T06:12:46Z")

</div>

I am shipping logs(to ELK host) from two places for each build -

1. using filebeat from one host to ELK host.
2. using logstash plugin from jenkins to ELK host .

Two indexes are getting generated.

I want to pass a unique ID (which may a increment value such as count ++) everytime i run build or everytime the index is created.This unique ID may be a custom field and want to view this field in Kibana. Is this possible.Any input will be much appreciated.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 29, 2018, 6:17am UTC](https://discuss.elastic.co/t/add-a-counter-for-every-build/158687/2 "2018-11-29T06:17:22Z")

</div>

You would need the build process to generate this and output it in the log file.

---

<div class="post-metadata">

**Author:** ![mrashid](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mrashid](https://discuss.elastic.co/u/mrashid)\
**Post date:** [December 3, 2018, 12:23pm UTC](https://discuss.elastic.co/t/add-a-counter-for-every-build/158687/3 "2018-12-03T12:23:24Z")

</div>

OKay. Thanks for the input.

---

<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:** [December 31, 2018, 12:23pm UTC](https://discuss.elastic.co/t/add-a-counter-for-every-build/158687/4 "2018-12-31T12:23:29Z")

</div>

Closed on December 31, 2018, 12:23pm UTC

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