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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...