Splunk Search

How to search specific lines in splunk log file?

saibal6
Path Finder

I have 100 lines content log files where I want to show only between 32-80 lines in searching without regex condition.

Tags (1)
0 Karma
1 Solution

logloganathan
Motivator

Alway using regular expression is good.

else you can try like this
eval myField = replace (_raw, "[\n\r]","|") | makemv delim="|" myField | eval 32thline=mvindex(myField ,32) | eval 32thline=mvindex(myField ,33) | ..| eval 80thline=mvindex(myField ,80)

View solution in original post

logloganathan
Motivator

Alway using regular expression is good.

else you can try like this
eval myField = replace (_raw, "[\n\r]","|") | makemv delim="|" myField | eval 32thline=mvindex(myField ,32) | eval 32thline=mvindex(myField ,33) | ..| eval 80thline=mvindex(myField ,80)

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...