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 Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...