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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...