# How to generate grok pattern using existing elasticsearch index?

**URL:** <https://discuss.elastic.co/t/how-to-generate-grok-pattern-using-existing-elasticsearch-index/237116>\
**Category:** Logstash\
**Created:** [June 15, 2020, 11:07am UTC](https://discuss.elastic.co/t/how-to-generate-grok-pattern-using-existing-elasticsearch-index/237116 "2020-06-15T11:07:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dattack13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dattack13/32/70452_2.png) [@dattack13](https://discuss.elastic.co/u/dattack13)\
**Post date:** [June 15, 2020, 11:07am UTC](https://discuss.elastic.co/t/how-to-generate-grok-pattern-using-existing-elasticsearch-index/237116/1 "2020-06-15T11:07:54Z")

</div>

Hello All,

Let me explain my existing structure, I have 4 servers (Web Server, API Server, Database server, SSIS Severs) and installed filebeat and winlog in all four servers and from there I am getting all logs in my logstash, but here is the thing every log I am getting in message body, and for some messages I am getting difficulty to write correct GROK pattern, is there anyway I can get the pattern from Kibana (FYI as of now I am storing all logs in elasticsearch which I can see through Kibana.)

---

<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 13, 2020, 11:07am UTC](https://discuss.elastic.co/t/how-to-generate-grok-pattern-using-existing-elasticsearch-index/237116/2 "2020-07-13T11:07:57Z")

</div>

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