Splunk Search

How to extract more logs after searching for particular string?

mfshravan
New Member

Hi All,

I would like to extract more logs after searching for particular string.

Eg.,

I want to search with string "Myname" and i want to see 3 lines along with search string in output

Note : 3 lines are not constant and keeps on changes

abcdefghijklmnop

1234567890

Myname

dsadasdasd

1231232131231

asdasdasdas

 

Expected result

Myname

dsadasdasd

1231232131231

asdasdasdas

 

dsasaasdsa

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...