# Filtering log file

**URL:** https://discuss.elastic.co/t/filtering-log-file/122029
**Category:** Elasticsearch
**Created:** [March 1, 2018, 10:09am UTC](https://discuss.elastic.co/t/filtering-log-file/122029 "2018-03-01T10:09:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![joshi12](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@joshi12](https://discuss.elastic.co/u/joshi12)
#### Post date: [March 1, 2018, 10:09am UTC](https://discuss.elastic.co/t/filtering-log-file/122029/1 "2018-03-01T10:09:37Z")

</div>

I have inserted a database log file into elasticsearch and viewed in kibana, now when i search for a error it justs matches those lines and displays , but i want the matched line and also the next consecutive lines of the error . All the consecutive lines will have the same code which is embed in those lines . so is there any way that i can retrieve those lines without typing the code in the searchbox of kibana.

---

<div class="post-metadata">

### Author: ![Eswar\_Kumar\_Musiboin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eswar_kumar_musiboin/32/28623_2.png) [@Eswar\_Kumar\_Musiboin](https://discuss.elastic.co/u/Eswar_Kumar_Musiboin)
#### Post date: [March 1, 2018, 12:44pm UTC](https://discuss.elastic.co/t/filtering-log-file/122029/2 "2018-03-01T12:44:56Z")

</div>

please provide matching error line and consecutive lines example. without these its incomplete to suggest.

---

<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: [March 30, 2018, 10:30am UTC](https://discuss.elastic.co/t/filtering-log-file/122029/4 "2018-03-30T10:30:14Z")

</div>

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