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!

Platform Newsletter Highlights | March 2023

 March 2023 | Check out the latest and greatestIntroducing Splunk Edge Processor, simplified data ...

Enterprise Security Content Updates (ESCU) - New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 3 releases of new content via the Enterprise ...

Thought Leaders are Validating Your Hard Work and Training Rigor

As a Splunk enthusiast and member of the Splunk Community, you are one of thousands who recognize the value of ...