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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...