# Logstash input plugin generator to generate dynamic data for elastic search

**URL:** <https://discuss.elastic.co/t/logstash-input-plugin-generator-to-generate-dynamic-data-for-elastic-search/35781>\
**Category:** Logstash\
**Created:** [November 27, 2015, 4:34pm UTC](https://discuss.elastic.co/t/logstash-input-plugin-generator-to-generate-dynamic-data-for-elastic-search/35781 "2015-11-27T16:34:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![priya](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@priya](https://discuss.elastic.co/u/priya)\
**Post date:** [November 27, 2015, 4:34pm UTC](https://discuss.elastic.co/t/logstash-input-plugin-generator-to-generate-dynamic-data-for-elastic-search/35781/1 "2015-11-27T16:34:33Z")

</div>

I was wondering if we could use regular expression to specify the data to be emitted so that the data that gets generated is as much as possible random or different every time - with the constraint that it fits into the specified pattern.

I am referring to this [https://www.elastic.co/guide/en/logstash/current/plugins-inputs-generator.html](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-generator.html)

can we do something like this?

input {  
generator {  
lines =\> [  
# specify regexp here  
]  
# Emit all lines 3 times.  
count =\> 3  
}  
}

---

<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:20am UTC](https://discuss.elastic.co/t/logstash-input-plugin-generator-to-generate-dynamic-data-for-elastic-search/35781/2 "2017-07-06T05:20:59Z")

</div>


