Splunk Search

Howto display search result matching a keyword and few line before and after the keyword matched

krusovice
Path Finder

Hello,

I've this specific requirement for log search when matching a keyword, the result show display the matched event and 5 lines before and after the matched event.

The search is simple as below:

index="booking" host=* "CreateBookingError"| table _raw

The objective is to know the chronological of events matching this keyword. How can I achieve it?

Thanks.

0 Karma

jaime_ramirez
Communicator
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...