Print nearby lines after query result


(Senthil Raja) #1

Team,

As per our requirement, i have to search a string in ES logs. And, print
five lines before and after the result query.

Is there any way to do that ?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8881e7d5-c659-49c0-8481-595bdab0a7cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Senthil Raja) #2

In unix we are using grep -A 5 -B 5 "" . Looking for the similar
requirement.

On Thursday, May 29, 2014 8:48:47 PM UTC+5:30, Senthil Raja wrote:

Team,

As per our requirement, i have to search a string in ES logs. And, print
five lines before and after the result query.

Is there any way to do that ?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/39bf46eb-e749-44e4-8a9e-3658b32e5ce7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Otis Gospodnetić) #3

I'd be curious to hear if anyone has any clever suggestions for this, too.

Otis

Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/

On Thursday, May 29, 2014 11:29:18 AM UTC-4, Senthil Raja wrote:

In unix we are using grep -A 5 -B 5 "" . Looking for the similar
requirement.

On Thursday, May 29, 2014 8:48:47 PM UTC+5:30, Senthil Raja wrote:

Team,

As per our requirement, i have to search a string in ES logs. And, print
five lines before and after the result query.

Is there any way to do that ?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/448f18d3-131c-44d4-9efd-daa57ef72069%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #4