# Increment field of Elasticsearch from logstash

**URL:** <https://discuss.elastic.co/t/increment-field-of-elasticsearch-from-logstash/27740>\
**Category:** Elasticsearch\
**Created:** [August 20, 2015, 8:32am UTC](https://discuss.elastic.co/t/increment-field-of-elasticsearch-from-logstash/27740 "2015-08-20T08:32:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)\
**Post date:** [August 20, 2015, 8:32am UTC](https://discuss.elastic.co/t/increment-field-of-elasticsearch-from-logstash/27740/1 "2015-08-20T08:32:03Z")

</div>

I have one field  
index = in  
type = mytype  
field =  
...  
...  
count  
...  
...

i just want to write a script which will update my count field by 1 in ES leaving rest as it was from logstash,

so my logstash \*.conf file looks like  
so input to logstash is

id=ET12 (script should increment count field in elasticsearch by one of this id)

```
  input { 
	http {
    ...
  }
}

output { 
  stdout { codec => json }
}

```

what should go inside output of logstash to achieve what i want?  
kindly help  
thanks

---

<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 5, 2017, 11:54pm UTC](https://discuss.elastic.co/t/increment-field-of-elasticsearch-from-logstash/27740/2 "2017-07-05T23:54:52Z")

</div>


